[X-Unix] General Scripting Question

David Ledger dledger at ivdcs.demon.co.uk
Wed Apr 15 02:47:02 PDT 2009


At 07:11 -0500 14/4/09, Eric F Crist wrote:
>On Apr 13, 2009, at 3:19 PM, Russell McGaha wrote:
>>  Eric;
>>  	I am a little sleep deprived today; but I wasn't meaning to 
>>imply I wanted someone to write it for me, I actually LIKE learning 
>>things like this.
>>  	I fairly certain I could manage the last two parts, sending 
>>the email, and moving the files.  I'm at a loss on how to start 
>>checking the free space on a volume though.  Could you give me a 
>>nudge toward what command(s), might give me this type of info?
>>  	Also; you've given me a hand before.  I, THINK, I thanked you 
>>for your help; if I didn't let me say that I did appreciate it 
>>greatly!
>You absolutely did.  Brian, it seems, did most of the leg work for 
>you using perl, though there are shell alternatives to what he's 
>done in perl.  Kevin gave you the disk-space checking commands, du 
>and df.
>You can go the perl route, a language I recommend anyone to learn, 
>but I think it's grossly over-powered for your simple task. grep, 
>cut, awk, df, du, and test are all you really need.  These utilities 
>are pretty universal.

And any command line that includes 'perl .... | perl ....' indicates 
that more thought is needed. Especially if it is in a script that is 
going to be run more than once.

Same for awk, 'grep ... | awk ...', 'sed ... | awk ...' ...

David


-- 
David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
david.ledger at ivdcs.co.uk
www.ivdcs.co.uk


More information about the X-Unix mailing list