Hi,
My file looks something like the following
/data/udb/sync/exp/hrzsync.exp.1
/data/udb/sync/exp/hrzsync.exp.2
/data/udb/sync/exp/hrzsync.exp.3
etc............
I need to print the last field (FS="/" ie just the file names, removing the preceeding full path so that my output is
hrzsync.exp.1
hrzsync.exp.2
hrzsync.exp.3
Running this within a script the exact number of entries in the directory string will vary so I can't simply use $5 with FS="/"
Can anyone help
Thanks
Lesley
My file looks something like the following
/data/udb/sync/exp/hrzsync.exp.1
/data/udb/sync/exp/hrzsync.exp.2
/data/udb/sync/exp/hrzsync.exp.3
etc............
I need to print the last field (FS="/" ie just the file names, removing the preceeding full path so that my output is
hrzsync.exp.1
hrzsync.exp.2
hrzsync.exp.3
Running this within a script the exact number of entries in the directory string will vary so I can't simply use $5 with FS="/"
Can anyone help
Thanks
Lesley