[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wp-mirror-list] Attempting to mirror on laptop
From: |
wp mirror |
Subject: |
[Wp-mirror-list] Attempting to mirror on laptop |
Date: |
Sun, 19 Aug 2012 16:06:52 -0400 |
Dear Benjamin,
Thank you very much for your diagnostics. I think we are closing in
on the problem.
0) Preamble
Error messages like the one you provided:
[: 15773: -a: unexpected operator
refer to the shell commands like:
if [ -a $IMAGE./2/28/Hw\-augustus.jpg ]; then
and
if [ -a $IMAGE./Hw\-augustus.jpg ]; then
This is quite interesting because this means that your shell is not
recognizing a valid BASH expression (one containing the -a operator).
Perhaps your default shell is DASH, which does not have the -a
operator.
The first line of every i-chunk reads:
#!/bin/sh
So, let us determine whether or not your default shell is BASH.
1) BASH
Please show me your output for the following commands:
shell> ls -l /bin/*sh
-rwxr-xr-x 1 root root 926536 Apr 10 2010 /bin/bash
-rwxr-xr-x 1 root root 104168 Dec 14 2010 /bin/dash
lrwxrwxrwx 1 root root 4 Feb 14 2011 /bin/rbash -> bash
lrwxrwxrwx 1 root root 4 Feb 14 2011 /bin/sh -> bash
shell> man bash
<snip>
CONDITIONAL EXPRESSIONS
Conditional expressions are used by the [[ compound command and the
test and [ builtin commands to test file attributes and perform string
and arithmetic comparisons. Expressions are formed from the following
unary or binary primaries. If any file argument to one of the pri‐
maries is of the form /dev/fd/n, then file descriptor n is checked. If
the file argument to one of the primaries is one of /dev/stdin,
/dev/stdout, or /dev/stderr, file descriptor 0, 1, or 2, respectively,
is checked.
Unless otherwise specified, primaries that operate on files follow sym‐
bolic links and operate on the target of the link, rather than the link
itself.
When used with [[, The < and > operators sort lexicographically using
the current locale.
See the description of the test builtin command (section SHELL BUILTIN
COMMANDS below) for the handling of parameters (i.e. missing parame‐
ters).
-a file
True if file exists.
-b file
True if file exists and is a block special file.
-c file
True if file exists and is a character special file.
-d file
True if file exists and is a directory.
-e file
True if file exists.
-f file
True if file exists and is a regular file.
<snip>
2) DASH
shell> man dash
<snip>
test expression
[ expression ]
The test utility evaluates the expression and, if it evaluates to
true, returns a zero (true) exit status; otherwise it returns 1
(false). If there is no expression, test also returns 1 (false).
All operators and flags are separate arguments to the test util‐
ity.
The following primaries are used to construct expression:
-b file True if file exists and is a block special file.
-c file True if file exists and is a character special file.
-d file True if file exists and is a directory.
-e file True if file exists (regardless of type).
-f file True if file exists and is a regular file.
<snip>
3) wp-mirror
One possible way for me to eliminate this problem in future would be
to replace every
-a file
with
-f file
Another way would be to replace
#!/bin/sh
with
#!/bin/bash
Your thoughts would be most welcome.
Sincerely Yours,
Kent
- [Wp-mirror-list] Attempting to mirror on laptop, (continued)
- [Wp-mirror-list] Attempting to mirror on laptop, wp mirror, 2012/08/07
- [Wp-mirror-list] Attempting to mirror on laptop, Dr. Kent L. Miller, 2012/08/07
- [Wp-mirror-list] Attempting to mirror on laptop, wp mirror, 2012/08/08
- [Wp-mirror-list] Attempting to mirror on laptop, wp mirror, 2012/08/09
- [Wp-mirror-list] Attempting to mirror on laptop, Dr. Kent L. Miller, 2012/08/13
- [Wp-mirror-list] Attempting to mirror on laptop, wp mirror, 2012/08/15
- [Wp-mirror-list] Attempting to mirror on laptop, Dr. Kent L. Miller, 2012/08/15
- [Wp-mirror-list] Attempting to mirror on laptop, wp mirror, 2012/08/17
- [Wp-mirror-list] Attempting to mirror on laptop, Dr. Kent L. Miller, 2012/08/19
- [Wp-mirror-list] Attempting to mirror on laptop,
wp mirror <=
- [Wp-mirror-list] Attempting to mirror on laptop, wp mirror, 2012/08/20