[lug] Unix help required(i guess results will come using sed and awk)

Prakash Kamani Prakash at Yodlee.com
Sat Apr 14 17:02:50 MDT 2001


hi folks

I am not a unix crack and i just cant figure out how to make it work. 
here is what i need to do.

I have wriiten down a shell script which does many things. In between at
some line i need to write a command to do the following.

Say i have a file(version.txt)  in which the content is 
//aggregation/storm/main/modules/YODLEE/HotMail.pm#3 - updating
D:\src\aggregation\stomr\main\modules\YODLEE\HotMail.pm
//aggregation/storm/main/modules/YODLEE/HtmlDocument.pm#2 - updating
D:\src\aggregation\stomr\main\modules\YODLEE\HtmlDocument.pm
//aggregation/storm/main/modules/YODLEE/YahooMail.pm#1 - updating
D:\src\aggregation\stomr\main\modules\YODLEE\YahooMail.pm
//aggregation/storm/main/modules/YODLEE/HtmlTable.pm#4 - updating
D:\src\aggregation\stomr\main\modules\YODLEE\HtmlTable.pm

Now i use this content ( cat <filename>) and get a output in the following
form in a file(results.log)

Source code updated: //aggregation/storm/main/modules/YODLEE/HotMail.pm#3
Source code updated:
//aggregation/storm/main/modules/YODLEE/HtmlDocument.pm#2
Source code updated: //aggregation/storm/main/modules/YODLEE/YahooMail.pm#1
Source code updated: //aggregation/storm/main/modules/YODLEE/HtmlTable.pm#4

using "cat version.txt | awk '/[A-Z,a-z,0-9]/ { print "Source code
updated:",$1}' | tee -i ~prakash/test/results.log"    


Instead of getting the format in the above form , i want the format in
following way
Source code updated: HotMail.pm
Source code updated: HtmlDocument.pm
Source code updated: YahooMail.pm
Source code updated: HtmlTable.pm


How to get this done?

Thanks
Prakash




More information about the LUG mailing list