Hi All,
My apologies for the VERY simple qs. Want to send echo messages to a log file. Is my code right? Can this be done with printf function? Currently what is happening is the message appears on my screen with the path following it and backup.log file not created.
Message that appears on screen:
Forcing any existing sampleDB applications offline... /db2_backup/backup.log
Code:
logFilePath=/db2_backup/backup.log
echo '\n' "Forcing any existing ${dbName} applications offline... " 2>&1 $logFilePath
TIA,
T
My apologies for the VERY simple qs. Want to send echo messages to a log file. Is my code right? Can this be done with printf function? Currently what is happening is the message appears on my screen with the path following it and backup.log file not created.
Message that appears on screen:
Forcing any existing sampleDB applications offline... /db2_backup/backup.log
Code:
logFilePath=/db2_backup/backup.log
echo '\n' "Forcing any existing ${dbName} applications offline... " 2>&1 $logFilePath
TIA,
T