Adding characters to beginning or end of every line in a file
Writing by shivdev on Tuesday, 28 of July , 2015 at 10:34 pm
You can use awk:
awk ‘{print “Begin : ” $0 ” \”End\”.”}’ file.txt
Or you could use sed:
sed ‘s/^/ Begin : /g’ file.txt
sed ‘s/$/ “End”./g’ file.txt
Leave a comment
Category: Linux
- Add this post to
- Del.icio.us -
- Digg -
- -
- Tweet -
-
-