|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
hi all,
I have the following contents in a file, each is 1 line: 64,000 B 04/23/07 07:32:37 M1 A /data/oracle/LNDBDP1/backup/arc2adsm/ LNDBDP1_arc_l0_t620573562_s2398_p1.rmn 1,267,200 B 04/23/07 07:32:37 M1 A /data/oracle/LNDBDP1/backup/ arc2adsm/LNDBDP1_arc_l0_t620574474_s2399_p1.rmn And I need to extract the *.rmn bit at the the end of the lines not including the full path. Any ideas? Thanks |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
jhd41@hotmail.com wrote:
> hi all, > I have the following contents in a file, each is 1 line: > 64,000 B 04/23/07 07:32:37 M1 A /data/oracle/LNDBDP1/backup/arc2adsm/ > LNDBDP1_arc_l0_t620573562_s2398_p1.rmn > 1,267,200 B 04/23/07 07:32:37 M1 A /data/oracle/LNDBDP1/backup/ > arc2adsm/LNDBDP1_arc_l0_t620574474_s2399_p1.rmn > > And I need to extract the *.rmn bit at the the end of the lines not > including the full path. > > Any ideas? > > Thanks > sed 's:.*/::' file Ed. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On 26 Apr., 12:51, j...@hotmail.com wrote:
> hi all, > I have the following contents in a file, each is 1 line: > 64,000 B 04/23/07 07:32:37 M1 A /data/oracle/LNDBDP1/backup/arc2adsm/ > LNDBDP1_arc_l0_t620573562_s2398_p1.rmn > 1,267,200 B 04/23/07 07:32:37 M1 A /data/oracle/LNDBDP1/backup/ > arc2adsm/LNDBDP1_arc_l0_t620574474_s2399_p1.rmn > > And I need to extract the *.rmn bit at the the end of the lines not > including the full path. awk -F/ '{print $NF}' your_file Janis > > Any ideas? > > Thanks |
|
![]() |
| Outils de la discussion | |
|
|