![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Awk not working due to missing new line character at last line of file | pinnacle | Shell Programming and Scripting | 2 | 05-07-2009 09:51 PM |
| error while replacing a string by new line character in sed | millan | Shell Programming and Scripting | 8 | 04-28-2009 05:06 AM |
| Replacing a character string in a file | rjsha1 | Shell Programming and Scripting | 13 | 04-11-2009 01:07 PM |
| Replacing a character in a line | Usha Shastri | UNIX for Dummies Questions & Answers | 2 | 04-02-2009 02:08 AM |
| Replacing character in file with null value | HLee1981 | Shell Programming and Scripting | 18 | 07-18-2006 01:33 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Example of file content:
ksh: cat result.dat 1.11a,Test result for scenario 1,1 2 3 4,p 1.12b,Test result for scenario 2,incomplete,q 1.13,Test result for scenario 3, 4 5 6,P ... The number of characters per line varies but the last field is always one character (e.g ,p) and the number of fields per line is always 4 Thanks for assisting |
|
||||
|
awk '{printf("%sZ\n",substr($0,1,length($0)-1)) ;}' test
|
| Sponsored Links | ||
|
|