in reply to How to comment out lines in a text?
$ cat TAG MYTAG ( Line 1 Line 2 Line 3 ); NOTMYTAG ( foo bat ); MYTAG ( Line 1 Line 2 Line 3 ); $ perl -n -e 'BEGIN{$com=""}' -e '$com="#"if/^MYTAG\W/;print"$com$_";$ +com=""if/^\);$/' <TAG #MYTAG ( #Line 1 #Line 2 #Line 3 #); NOTMYTAG ( foo bat ); #MYTAG ( #Line 1 #Line 2 #Line 3 #);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) 2Re: How to comment out lines in a text?
by jeffa (Bishop) on Mar 23, 2002 at 00:48 UTC | |
by zengargoyle (Deacon) on Mar 23, 2002 at 01:03 UTC | |
by jeffa (Bishop) on Mar 23, 2002 at 07:51 UTC |