02-11-2004
10,
0
Join Date: Jul 2003
Last Activity: 11 September 2006, 4:50 AM EDT
Location: London, England
Posts: 10
Thanks Given: 0
Thanked 0 Times in 0 Posts
cut
Hi,
Does anyone know a more efficient way of writing the below.
exe=`echo ${testversion} | cut -d/ -f1,6 | cut -d@ -f1,2`
exe=`echo ${exe%@*}`
exe=`echo ${exe#*/}`
the variable testversion is in the following format:
/clearcase/test/pfs/bin/pfs0007f.fmx@@/main/20
I need the 'pfs0007f.fmx' bit only. This is always in between the 1st '@' and the '/' before that.
I'm a newbee!!
Thanks everso,
Cath