IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New how to use / as a field separator with awk
trying to clip out a particular field
example
echo "/export/home/foobar" | awk -F/ '{print $1}' should return export but it returns null

trying to parse the output of df to see what file systems are mounted and to kick off a script that is particular to each file system.

Either that or put in 20 cronjobs on every machine knowing that only one will complete. Since the apps float between different machines parsing what file system is mounted will tell me what version of the script to run.

thanx,
bill
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 51 years. meep

reach me at [link|mailto:bill.oxley@cox.net|mailto:bill.oxley@cox.net]
New Works as advertised.
Try $2. :-)
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New huh? why does $2 work if / is a field separator
export should be $1?
thanx,
bill
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 51 years. meep

reach me at [link|mailto:bill.oxley@cox.net|mailto:bill.oxley@cox.net]
New never mind :-) too long a drive yesturday
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 51 years. meep

reach me at [link|mailto:bill.oxley@cox.net|mailto:bill.oxley@cox.net]
New :-)
For others who might be interested, everything *before* the first field separator becomes $1...
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New I read that as 'two dollars' at first.
And then wondered why you were offering Box two dollars... then I read the thread properly. :-D

Wade.


Is it enough to love
Is it enough to breathe
Somebody rip my heart out
And leave me here to bleed
 
Is it enough to die
Somebody save my life
I'd rather be Anything but Ordinary
Please



-- "Anything but Ordinary" by Avril Lavigne.

· my ·
· [link|http://staticsan.livejournal.com/|blog] ·
· [link|http://yceran.org/|website] ·

     how to use / as a field separator with awk - (boxley) - (5)
         Works as advertised. - (admin) - (4)
             huh? why does $2 work if / is a field separator - (boxley) - (2)
                 never mind :-) too long a drive yesturday -NT - (boxley) - (1)
                     :-) - (admin)
             I read that as 'two dollars' at first. - (static)

Powered by an Einstein-Rosen bridge!
47 ms