![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding words to beginning of lines | Ernst | Shell Programming and Scripting | 9 | 04-03-2008 11:23 AM |
| Need to serach if a new line character exists on the last line in a file | sunilbm78 | UNIX for Dummies Questions & Answers | 10 | 02-29-2008 11:15 AM |
| adding a line to a file | andy2000 | Shell Programming and Scripting | 2 | 03-26-2007 05:44 AM |
| input a line at the beginning of every file in a directory? | Terrible | Shell Programming and Scripting | 6 | 08-16-2006 03:42 AM |
| Unix Script with line number at beginning of each line. | mascorro | Shell Programming and Scripting | 5 | 06-19-2006 01:34 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How can i add a character(#) in the beginning of every line in a .dat file
|
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Code:
sed -i -e 's_.*_#&_' input.dat |
|
#3
|
|||
|
|||
|
one more,
Code:
awk '{ printf "#"; print }' <filename>
|
|||
| Google The UNIX and Linux Forums |