![]() |
|
|
|
|
|||||||
| 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 |
| how to read the column and print the values under that column | gemini106 | Shell Programming and Scripting | 6 | 03-28-2008 03:05 AM |
| Print row if value in column 1 is the first occurence | Raynon | Shell Programming and Scripting | 7 | 03-17-2008 10:31 PM |
| to print output using shell command | cdfd123 | Shell Programming and Scripting | 13 | 08-02-2007 09:40 AM |
| to print column using awk | cdfd123 | Shell Programming and Scripting | 2 | 07-26-2007 10:15 AM |
| can awk print column using a variable ?? | jambesh | Shell Programming and Scripting | 36 | 09-26-2006 04:39 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi All,
I know awk command can do it, but can we use tr command to print 5th column of out put 'ls -l' command???? Regards, Nidhi... |
| Forum Sponsor | ||
|
|
|
|||
|
Thanks All,
I have got the solution.. lines=`ls -l | tr -s [:space:] | cut -d ' ' -f 5 | wc -l` lines=`expr $lines - 1` echo "Fifth column of 'ls -l' command:::" ls -l | tr -s [:space:] |cut -d ' ' -f 5 | tail -n $lines |
|||
| Google The UNIX and Linux Forums |