≡ Menu

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 on a Linux or Unix-like systems?

Tutorial details
DifficultyEasy (rss)
Root privilegesNo
Estimated completion time2m

[click to continue…]

Ksh Read a File Line By Line ( UNIX Scripting )

How do I read a file line by line using KSH shell scripting under UNIX like operating systems?
[click to continue…]

BASH: Prepend A Text / Lines To a File

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?
[click to continue…]