Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


Where can I get free tips about Linux shell script programming?

It's not uncommon for me to receive email from people asking for information that's covered in one or more of my books, and this morning I received a message asking about good places to go online to learn more about shell script programming. My answer, of course, is to buy a copy of my best selling book Wicked Cool Shell Scripts, but if that's not in your budget, there's another possibility to explore.

Dave's Answer:
Starting with the August 2004 issue, I am now contributing a monthly column on shell scripting basics to LinuxWorld Magazine called Wicked Cool Linux.

Please take a minute and check out my ever-growing column archive at http://linux.intuitive.com/ and if it looks good, please subscribe to the magazine or at least bookmark the page and come back every month for a new installment of my column.

There are plenty of other online resources too, of course. You need but pop over to Google and search for "unix shell script programming" or "shell scripting tutorial" or "shell scripting guide" (etc etc) to find them.

I'll also recommend another magazine that's now in online form: Unix Review.


Related Shell Script Programming articles:
✔   Secretly capture screenshots on my Mac?
When I used to work on a Linux system, there was a utility we had that would let me take screen captures every...
✔   Parsing "id" strings in a Shell Script?
Hello Dave. I need a Bash shell script that creates a directories with the group names automatically when user logs in to the...
✔   Copy and Paste from the Mac OS X Command Line?
I am constantly running commands in Terminal.app on my MacBook and then copying and pasting the results into email messages or documents. Yes,...
✔   Script to test line lengths for Twitter compatibility?
I've been tasked with writing a series of tweets for a Black Friday marketing campaign and am finding it a bit tricky because...
✔   Shell script to convert lowercase to title case?
As part of a project I'm working on, I find myself deep in a Linux shell script, needing to have a subroutine that...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  








Reader Comments To Date: 4

Avi said, on October 13, 2004 9:46 PM:

Can a shell script read and process a file which is continuously being written to (like the --follow option in tail)?

Basically I would like to read a log file and when I find a certain string, generate a firewall entry to block this IP. The script needs to continuously read this file, not a one time shot.

Dave Taylor said, on October 15, 2004 12:15 AM:

Hmmm.... that's an interesting question. Let's see.... I think I would use some sort of loop where I'd use 'tail -f' on the relevant file, then sleep some period of time, then check the file again for updates. If you keep track of the lines in the file, you could always use that as a change marker (though you'd sometimes be off an iteration because of the file changing between the 'wc' call and the actual test of the returned value).

But it should be quite doable!

Avi said, on October 15, 2004 9:32 PM:

What I did for now, until I think of (or find) a better way:

tail -f /var/log/mail/info writes into a fifo
block_ips reads from the same fifo

Where block_ips is the shell script that processes the log file.

Sanju said, on July 9, 2008 3:49 AM:

Hi Buddy...

You can find a lots of unix tips & tricks at www.unixground.blogspot.com

Regards,
Sanju

Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

I do have a comment, now that you mention it!











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.