![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to access values of awk/nawk variables outside the awk/nawk block? | saniya | Shell Programming and Scripting | 5 | 05-13-2008 08:37 AM |
| I need help counting the fields and field separators using Nawk | scrappycc | Shell Programming and Scripting | 3 | 02-06-2008 11:47 PM |
| concate the record | aboorkuma | Shell Programming and Scripting | 7 | 08-24-2007 01:59 PM |
| Append tabs at the end of each line in NAWK -- varying fields | madhunk | Shell Programming and Scripting | 6 | 07-12-2006 07:20 PM |
| Concate all lines into one. | oracle8 | Shell Programming and Scripting | 1 | 10-03-2002 12:34 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I have the the following question:
# cat report.lis | nawk -F: '{ if($0 ~ "^BE NO:") print "report_"$2".lis"}' ![]() .lisrt_ 111 .lisrt_ 111 .lisrt_ 222 .lisrt_ 222 .lisrt_ 333 .lisrt_ 333 # cat report.lis | nawk -F: '{ if($0 ~ "^BE NO:") print "report_" $2}' report_ 111 report_ 111 report_ 222 report_ 222 report_ 333 report_ 333 My question why I cannot concate these 3 fields: "report_" $2 ".lis" expected result is: report_ 111.lis report_ 111.lis report_ 222.lis report_ 222.lis report_ 333.lis report_ 333.lis By the way, I am using Sun server for unix script. Please help and thanks.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|