I have the following script in a shell
# The start of a filename
file=$(ls -tr $EMT*.dat | tail -1) # Select the latest file echo $file
file_seq=$( < /u02/sct/banner/bandev2/xxxxxx/misc/EFTSQL.dat)
echo $file_seq
file2 = '$file_seq + 1'
echo $file2
It is reading a file EFTSQL.dat (just one record 1234)
Here are the results:
+ ls -tr 3526_337092.dat EFT1234.dat HISTOGRAM200910.dat Histogram_200910.dat eluppdtop.dat idoc.dat lockbox_payments.dat
EFT1234.dat # Select the latest file echo
file_seq=+ + 0< /u02/sct/banner/bandev2/middlebury/misc/EFTSQL.dat
0< /u02/sct/banner/bandev2/middlebury/misc/EFTSQL.dat
1234
echo
file2 = ' + 1'
echo
now I want to add 1 and stored in file2, so I ended with 1235
then I need to concatenated. EMTFile2.DAT
SO I ended with EMT12345.dat and stored in a variable so I can rename
a file that I just ftp with that name..
this part seems to be working
file_seq=$( < /u02/sct/banner/bandev2/xxxxxx/misc/EFTSQL.dat)
echo $file_seq
but this part is not
file2 = '$file_seq + 1'
and how I concatenate the values EMT||FILE2||.DAT
SO I ended with EMT12345.dat