![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| moving directories to new directories on multiple servers | mackdaddy07 | Shell Programming and Scripting | 0 | 04-06-2007 08:30 AM |
| How to backup /home directories? | kingsan | SUN Solaris | 1 | 05-03-2006 02:41 PM |
| Delete old home directories | munch | UNIX for Dummies Questions & Answers | 2 | 03-01-2006 10:16 PM |
| HACMP users home directories | zz2kzq | AIX | 1 | 02-21-2006 12:22 PM |
| home network not working! | boris888 | IP Networking | 2 | 05-14-2002 07:10 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
Code:
find . -type d |
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
it does but it lists all directories recursivly which I did not want. I was just looking for directories in the current directory
penchal, I changed your line a bit awk can parse, whatever it is called, the ^d so grep is not needed. ls -ltr | awk '/^d/ {print $NF}' Im still reading up on awk to figure out what exactly the $NF does though |
|
#10
|
|||
|
|||
|
ok, $NF is just a variable for the number of fields in the file.. so whenI call it it just automagically calls the last field to be printed? Is that correct?
|
|
#11
|
|||
|
|||
|
Yes that is what $NF refers to.
|
|
#12
|
|||
|
|||
|
awesome, thanks everyone. I didnt realize this scripting stuff wasnt so hard to figure out. I wish I would of jumped on learning this stuff a few years ago
|
|||
| Google The UNIX and Linux Forums |