Unix Linux Community
Replacing the last character for each line in a file
Shell Programming and Scripting
cfajohnson
June 25, 2009, 6:12pm
21
That will add a 'z' to the line. To replace the last character using sed:
sed 's/.$/z/' filename
← previous page