
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Bourne / bash problem
James Lang writes:
> #!/bin/bash
> echo \
> "word1 `echo # comment line 1...> /dev/null` \
> word2 `echo # comment line 2... > /dev/null` \
> word3 `echo # comment line 3... > /dev/null` \
> word4 `echo # comment line 4... > /dev/null` "
Eeewwwwww. We are gonna have to nail that cat door shut!<wink>
BTW
command \
--option `echo >/dev/null # comment line 1` \
--option `echo >/dev/null # comment line 2` \
--option `echo >/dev/null # comment line 3` \
--option `echo >/dev/null # comment line 4`
is a little more readable. This
c='echo >/dev/null'
command \
--option `eval "$c comment line 1"` \
--option `eval "$c comment line 2"` \
--option `eval "$c comment line 3"` \
--option `eval "$c comment line 4"`
might also work (partially tested in zsh) and it's up to you to decide
if it's any more readable.
Home |
Main Index |
Thread Index