![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
awk example
Hi,
In the following example, ls -l *.pdf -rw-r--r-- 1 devusr devgrp 4626001 Aug 11 13:50 0000783302.pdf -rw-r--r-- 1 devusr devgrp 9675018 Aug 11 13:55 0000783683.pdf I would like to retrieve the size, filename and filename without extension to a text file. Desired Output:- 4626001,0000783302.pdf,0000783302 9675018,0000783683.pdf,0000783683 I have tried using the following command and it worked partially... ls -l *.pdf | awk '{print $5","$9","$9}' > filename.txt can someone advice on the above example to meet the desired output.. Thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|