sed add text to beginning of line code example
Example 1: sed add word to beginning of line
$ sed 's/^/#/' file.txt
#add
#character
#at the
#beginning of
#each line
Example 2: sed add word to end of line
sed 's/.*/&:80/' abcd.txt >abcde.txt
$ sed 's/^/#/' file.txt
#add
#character
#at the
#beginning of
#each line
sed 's/.*/&:80/' abcd.txt >abcde.txt