Noel Carroll wrote:
> Talking about bash scripting. I was reading an article in LJ at the weekend
> that detailed using EX and 'here' files for scripting. Is this a common
> approach or are there better ways of doing it - like most things on Linux
not personally. i use sed - i figure it's called a stream editor for a
reason... the article seemed a bit odd in my mind and i've seen and
written a fair number of shell scripts.
the key to shell scripts is you need to remember they get built in
pieces. the overall thing might look utterly incomprehensible, but if
you break it down it will make sense. you read a shell script one way
and c a different way - just like you read a cookbook one way and a
novel another.
> there alwasy seems to be about 5 ways of doing something! What the hell is
> a 'here' file and is there more to it than just an _EOF_ flag as was
> detailed in the article.
a here file:
cat << EOF
blah
my path is $PATH
moo
EOF
that's pretty much it.
now back to beating a perl script into submission. (t's actually three
scripts acting together over tcp/ip - three test windows and at least
two edit windows and i have an 800x600 monitor that only allows two
xterms per screen. AUGH!
kevin
--
kevin at suberic.net "we were goin' for breakfast. in canada. we
fork()'ed on 37058400 made a deal: if she'd stop hookin', i'd stop
meatspace place: work shootin' people. maybe we were aiming high."
--porter, "payback"
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!