bankshot6164
Programmer
What is the syntax to strip a timestamp from the end of a file name to process through a Unix job script. I am a newbe to UNIX and would appreciate anyones help.
Thanks,
Bankshot
Thanks,
Bankshot
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
case $PARAM1 in
"OC1") FILE=`echo CECOLL_AGCY_InputtoDEP_RINTJ750*`;;
# ...
# Assuming there is more case statments and a esac
# to close/finish the case statement
# ...
export ITAS_INTRF_FILE1=$ITAS_INTRF/$FILE
export FILENAME=$FILE
# I am assuming that the ITAS_INTRF above is defined elsewhere in your script.
# Also assuming the FILENAME will be used elsewhere in the script.
files=`ls -lt $ITAS_INTRF|grep $FILE|awk '{print $9}'`
#I am assuming the "files=..." line and the one right after
#it should be one line. Note the ticks [b]'[/b] and the
#back ticks [b]`[/b]. The line as originally specified
#would not work - this new version will - not sure what you
#are doing with this as its not referenced the code fragment
#- other than assigning a value to it.
if [ -z $ITAS_INTRF_FILE1 ]
then
echo "$EXEC: File $ITAS_INTRF_FILE1 does not exist"
exit $FAILURE
fi
#on the [b]if [-Z $INTAS_INTRF_FILE1][/b], the [b]-Z[/b]
#needs to be lower case: [b]-z[/b] and whitespace is needed
#after the [ and before the ].