
Creating shell variable containing substring of another variable.
In article <31130AF4.5...@cowan.edu.au>,
Vaughan Castine <v.cast...@cowan.edu.au> wrote:
In the Bourne shell, a string in backquotes evaluates to the output of
the command inside the string. So:
a=`ls`
...will put a list of file in a. (Returns are treated as white space.)
So, you want:
list=`echo $var | sed 's/E//'`
(Note the confused quotes!)
If you're using csh for your scripts, switch to the Bourne shell. NOW.
csh is awful for scripts.
--
-------------------------------------------------------------------------------
Why do people surf the Information Superhighway? Won't they get run over?
http://www-hons-cs.cs.st-andrews.ac.uk/~dg
Sun-Earther David Daton Given of Lochcarron