![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remove the comment symbol ' from a file. | joyan321 | Shell Programming and Scripting | 3 | 06-23-2009 03:38 PM |
| comment lines | vero_81 | UNIX for Dummies Questions & Answers | 5 | 06-11-2009 04:35 AM |
| comment text in a file | learnbash | Shell Programming and Scripting | 8 | 04-11-2009 02:36 PM |
| how to comment multiple lines in unix | balireddy_77 | Shell Programming and Scripting | 3 | 02-19-2007 07:16 AM |
| Need to add a comment line in a text file | orakhan | Shell Programming and Scripting | 2 | 09-22-2005 08:36 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
using awk to comment out lines to the end of file
Hello,
I have a file as follow a b c c d d e I would like to write a awk command to insert # from the first occurence of "c" to the end of the files. OUTPUT should be like this a b #c #c #d #d #e I kept getting error while attempting to use break awk ' if ( $1 ~ /^c/ ) { beginline = NR ; break } ' Greatly appreciate your comment |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|