1,385 reputation
410
bio website none
location Massachusetts
age 40
visits member for 2 years, 2 months
seen yesterday

Software engineer and bash aficionado.


1d
comment How do I use the “if” command for multiple conditions?
if is just a statement, not a loop.
2d
comment Will a shell script execute in Solaris? if not, which is the fastest way to make it compatible
Try it, and if it doesn't work, you can come back and ask about any specific errors you don't understand.
2d
revised While command not found and syntax error near unexpected token
Indent error message
2d
comment While command not found and syntax error near unexpected token
The error message seems to indicate that your script has while:, not while :.
2d
suggested suggested edit on While command not found and syntax error near unexpected token
Oct
20
comment How to find the file corresponding to a pipe opened by a process?
Why not . /tmp/console instead?
Oct
20
comment several virtual profiles for the same user
Most of these seem tied to resources used by a different "identity" rather than the identify itself. ssh lets you choose keys based on the host you connect to and which user you connect as; editor settings seem more specific to what file is being edited rather than who edits it, etc.
Oct
18
comment How can a Bash script tell how it was run?
@JonathanLeffler Right; that should produce a syntax error, since the shell operator || is seen before the required final ] argument to [.
Oct
18
comment How can a Bash script tell how it was run?
-p is a POSIX-specified primary for the test command.
Oct
18
comment How can a Bash script tell how it was run?
Also, whether or not /dev/stdin exists in the file system depends on the operating system.
Oct
17
comment What is the result of running `chmod 7` on a file?
In octal, 7 == 007.
Oct
17
comment How to use commands on files that start with “-”
A third option: the leading hyphen isn't mistaken for the beginning of an option if the word is expected as the argument to a preceding option. For example: in grep -e -foo file.txt, the -e option takes an argument, so grep doesn't expect -foo to be an option.
Oct
16
comment How can I echo dollar signs?
The -e flag is used to expand, e.g, \t to a literal tab character. It is unrelated to escaping the dollar sign to prevent parameter expansion.
Oct
15
revised Precedence of && vs & in bash and zsh
added 303 characters in body
Oct
15
answered Precedence of && vs & in bash and zsh
Oct
15
answered set -xv behavior in ksh vs bash
Oct
14
answered Quotes in commands - grep example
Oct
12
comment Redirect stderr and stdout to another file descriptor
bash allows the special case of &> ./all.txt to redirect stdout and stderr at the same time.
Oct
12
comment Redirect stderr and stdout to another file descriptor
Unfortunately, &> does not allow you to duplicate two file descriptors into one; it only allows you to redirect to a file.
Oct
9
answered Why is variable assignment preceding command ignored?