[Wylug-help] Shell scripting

Nick Jeffery stash at o2.ie
Sun May 9 22:23:34 BST 2004


Hullo,

I've a variable (from cat'ing a file) in a bash shell script.  I'd like to
get only the first 32 characters of the file/variable on their own..

I've tried:

foo=`echo ${bar:32}`  but that doesn't seem to want to play ball.

Anyone got an idea?  Don't want to use regexps/perl/awk if at all possible.

Cheers,
nsj.

--
Now Playing:  The Charlatans - up to our hips [128kbps mp3]




More information about the Wylug-help mailing list