I created the following script, which is simple by nature, but can not get it to run properly. I exported each variable and echo the varible at the command line to confirm that the variable is returning value, but this will not write out/append to the file as intended. I think I am missing something?
#!/usr/bin/ksh #
# #
# Script: lth_test #
# #
# Rev By Date Description #
# 1.0 Lien Huynh 05/18/2006 This will append to a file that will #
# maintain the minimum avaiable and the date/time #
# so trending and/or analysis can be done later #
#########################################################################################
DATE1='date'
FILE1="/home/lhuynh/lth_test.dat"
#The following command gets the numerical value of the minimum available
MIN_VAL='grep -E "minimum available" /cachesys/mgr/ckey.out|tr -s '[:space:]'|cut -d" " -f5'
echo "$MIN_VAL $DATE1" >> $FILE1
#grep -E "minimum available" /cachesys/mgr/ckey.out|tr -s '[:space:]'|cut -d" " -f5 >> lth_test.dat
#!/usr/bin/ksh #
# #
# Script: lth_test #
# #
# Rev By Date Description #
# 1.0 Lien Huynh 05/18/2006 This will append to a file that will #
# maintain the minimum avaiable and the date/time #
# so trending and/or analysis can be done later #
#########################################################################################
DATE1='date'
FILE1="/home/lhuynh/lth_test.dat"
#The following command gets the numerical value of the minimum available
MIN_VAL='grep -E "minimum available" /cachesys/mgr/ckey.out|tr -s '[:space:]'|cut -d" " -f5'
echo "$MIN_VAL $DATE1" >> $FILE1
#grep -E "minimum available" /cachesys/mgr/ckey.out|tr -s '[:space:]'|cut -d" " -f5 >> lth_test.dat