Home » Infrastructure » Unix » delete last character from every line in a text file (Unix)
() 1 Vote
delete last character from every line in a text file [message #352750] |
Thu, 09 October 2008 05:41 |
Orac_NewBhie
Messages: 2 Registered: February 2008 Location: Manila, Philippines
|
Junior Member |
|
|
Hi All,
I'm in dire need to find a unix script (linux or solaris) that will delete the last character from every line in a text file.
Example here: text1.dat contains the following line
0000,house,car,room,school,education,economy,
1111,house,car,room,school,education,economy@
2222,house,car,room,school,education,economy#
3333,house,car,room,school,education,economy%
4444,house,car,room,school,education,economy&
Please help me create a script that will automatically delete the last character from every line in a text file (,@#%&)
Please help me.
Thank you!
|
|
|
|
|
|
Goto Forum:
Current Time: Mon Dec 02 16:43:20 CST 2024
|