cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help

 
SOLVED
Go to solution
Highlighted
Super Advisor

Need Help


I have a file which has line numbers in front of it and I need to remove them... how do I do that ?

1 use strict;
2 use warnings;
3 use File::Find;
4 use Digest::MD5;


Thanks,
Allan.
2 REPLIES 2
Highlighted
Acclaimed Contributor
Solution

Re: Need Help

Hi Allan:

In keeping with the Perl contents of your file, do:

# perl -pi.old -e 's/^\d+\s+//' file

...which makes a backup with the ".old" extension and eliminates leading digits and whitespace.

Regards!

...JRF...
Highlighted
Super Advisor

Re: Need Help

Thanks!