5

Awk with mutliple filed separators

view full story
linux-howto

http://www.unix.com – I try to trim a FTP log using awk , but the escape sequences does not work the way I want it. Input data Code: [3] Wed 3Oct10 21:48:00 - (002117) Sent file d:\ftp\home\tools\htmake.rar successfully (48.2 kB/sec - 40997 Bytes) [3] Wed 3Oct10 22:25:46 - (002118) Sent file d:\ftp\files\main\oct\camera1 picture(10.12).rar successfully (36.9 kB/sec - 53041 Bytes) Desired output Code: htmake.rar camera1 picture(10.12).rar I like the file name only. My test ends up like this Code: root@server:/tmp# cat FTP_0310.txt | awk -F"\\| success" '/Sent/ { print $(NF-1) }' awk: (HowTos)