![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help Required: Command to find IP address and command executed of a user | loggedout | Security | 2 | 08-06-2008 08:12 PM |
| help required in unix command/script | thaduka | UNIX for Advanced & Expert Users | 1 | 10-18-2005 02:27 AM |
| Unix command help required | thaduka | UNIX for Dummies Questions & Answers | 7 | 10-17-2005 03:24 PM |
| Help Required in Unix Command | thaduka | UNIX for Dummies Questions & Answers | 2 | 08-25-2005 11:12 PM |
| unix command required. | nowayin | SUN Solaris | 1 | 05-19-2004 01:03 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Required unix command!!!
Hi,
In a file I have data like... -rw-r----- 1 ftpuser users 1036695 Jul 6 14:59 ./APRIL 2007/Ujjain/My Disc (D)/9565DW07.04B -rw-r----- 1 ftpuser users 124080 Jul 6 14:59 ./APRIL 2007/Vadodara/vad_APRIL07/2082DW07.04B The above data is extracted using "find . -name 4704DW07.03B -print > file1" I want to generate output from the file like 1036695,9565DW07.04B 124080,2082DW07.04B can anybody give me a command to do the same(without shell scripts). Thanking you in advance, Ronald. |
|
||||
|
Quote:
Code:
$ cat file
-rw-r----- 1 ftpuser users 1036695 Jul 6 14:59 ./APRIL 2007/Ujjain/My Disc (D)/9565DW07.04B
-rw-r----- 1 ftpuser users 124080 Jul 6 14:59 ./APRIL 2007
$ awk -F"[ /]" ' { print $5 "," $NF } ' file
1036695,9565DW07.04B
124080,2082DW07.04B
|
|
||||
|
Hi,
Thanks for your response. In some cases it works. In the following case [devofsa]:/db01/BOIDW_FEED_DIR/BOIDW_FTP_DIR/cibex#cat file2 -rw-r----- 1 ftpuser users 249384 Jul 6 14:38 ./APRIL 2007/patna/4975DW07.04B -rw-r----- 1 ftpuser users 348738 Jul 6 14:38 ./APRIL 2007/patna/4976DW07.04B [devofsa]:/db01/BOIDW_FEED_DIR/BOIDW_FTP_DIR/cibex#cat file2 | awk -F"[ /]" ' { print $5 "," $NF } ' ftpuser,4975DW07.04B ftpuser,4976DW07.04B Is there something wrong. in this case instead of user I want size! Ronald. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|