LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] developerWorks article...

[ILUG] developerWorks article...

kevin lyda kevin at suberic.net
Mon May 15 11:15:32 IST 2000


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"




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell