in reply to Obtain CSV Fiile from text

How's this: echo "$your_line" | perl -nle 'print if s/.*?\s(\S+\.csv).*/$1/i'

EDIT: or, even better: perl -nle 'print if s#[^/]+(/\S+?\.csv).*#$1#i'

Replies are listed 'Best First'.
Re^2: Obtain CSV Fiile from text
by sherbertpunt (Initiate) on Mar 07, 2014 at 13:20 UTC

    Apologies to all I have been off for a couple of days, but thanks to all who came to my aid... in the end I went with..

    file=`echo $line | perl -n -l -e ' ($f) = $_ =~ m!.*/(\w+.csv)!i; print $f'

    I think my shell collegues were wary of this kind of magic :-) once again my thanks to you all