![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Linux and Unix Error ! Redhat,suse,centos,mandrake,Free BSD,Sun |
![]() |
|
Extract strings from text files, unix.
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Administrator
Posts: 18,702
Join Date: Jan 2006
Rep Power: 10
IM:
|
./00300000/10000/9000/319981-4.jpg ./00300000/10000/9000/319981-1.jpg ./00300000/10000/0000/310058-1.jpg ./02000000/00000/4000/2004784-1.jpg ./02000000/00000/4000/2004299-1.jpg ./02000000/00000/4000/2004784-4.jpg ./02000000/00000/4000/2004784-3.jpg I wish to extract just a substring of the filename portion of each line to end up with 319981 319981 310058 2004784 2004299 2004784 2004784 Any _simple_ combination of grep | sed | awk would suffice. For extra credit: I also need to remove duplicates and sort! |
|
|
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|