echo line

I have a file of that looks as follows:

foo bar
tom jerry
UNIX Linux

Each word and/or Linux is a different length. How do strip or remove the last character from each line using bash or ksh shell only?

{ 3 comments }

UNIX: Read a File Line By Line

by Vivek Gite on January 26, 2011 · 2 comments

How do I read a file line by line under UNIX using KSH or BASH shell?

{ 2 comments }

Ksh Read a File Line By Line ( UNIX Scripting )

by Vivek Gite on November 20, 2009 · 8 comments

How do I read a file line by line using KSH shell scripting under UNIX like operating systems?

{ 8 comments }

BASH: Prepend A Text / Lines To a File

by Vivek Gite on August 23, 2008 · 28 comments

Q. I can append text to a file using >> operator but how do I prepend a text to a file? I want the opposit of >> operation?

{ 28 comments }