Tuesday, March 15, 2011

How to remove first and last character each line in a file

SkyHi @ Tuesday, March 15, 2011
For first comma:

sed '/,//' < file If first comma is first character:

sed '/^,//' < file REFERENCES
http://stackoverflow.com/questions/2478232/how-to-remove-first-comma-on-each-line-in-a-file


remove-last-character-line
:%s/.$//g
this will delete every last char on each line.


Replace bracket
:%s/(//g


REFERENCES
http://www.unix.com/shell-programming-scripting/10133-remove-last-character-line.html