I have a job script that runs with input parms from the command line.
job.sh -p parm1_parm2_parm3_parm4_file_1.dat
The parms are separated by _
The last parm is a file name and can have an _ in the name.
I currently use the following commands to extract the parms
parm1=`eval echo \$JOBPARM|awk -F_ '{print $1}'`
parm2=`eval echo \$JOBPARM|awk -F_ '{print $2}'`
parm3=`eval echo \$JOBPARM|awk -F_ '{print $3}'`
parm4=`eval echo \$JOBPARM|awk -F_ '{print $4}'`
How do I get the 5th parm and include the _, if one exists, so that
parm5 = file_1.dat.
thanks