Re: OT: help with text file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> | Dave Stevens wrote:
>> | > I have a sequence of lines of ASCII text of varying length, each of which ends
>> | > with an integer. Anyone have a quick and dirty way of getting these lines
>> | > copied to a new file with only the last number on each line of the new file?

This tangent would not be complete without a perl version:

perl -ne 'print "$1\n" if /(\d+)$/;'  foot.txt>new_file.txt

Mike

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux