On Wed, 13 Sep 2000, Charles Galpin wrote:

> Do you want to remove the entire line if they *begin with those
> characters? If so, creating the following file, making it executable and
> running it will do this.
> 
> #!/usr/local/bin/perl -ni
> # convert.pl
> # usage: ./convert.pl file1 file2 file3 ...
> next if /^[; ]/;
> next if /^.com/;
> next if /\.(ROOT|GTLD)-/;
> print;
> 
> the -n switch does what -p does, but does not print the line by default
> I combined a few of the similar matches. You could write it in one big
> (but harder to understand) regex if you wanted to.
> 
while i love perl, as per my recent post, this seems like the
perfect job for sed -- deleting lines based on a simple matching.

rday

-- 
"This is Microsoft technical support.  How may I misinform you?"




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to