hi, how do i redirect stderr to a log file and at the same time display the error message at the console?
This is the first time i work with scripting. Part of my script below worked to redirect the error message but to display the same at the console is what i don't know how.
tar -cvf /dev/rmt0 /file1 /file2 2>> backup.log
Also, how will i trap if an error exists so i could have and If-Then-Else statement to display successful or unsuccessful backup?
thanks,
This is the first time i work with scripting. Part of my script below worked to redirect the error message but to display the same at the console is what i don't know how.
tar -cvf /dev/rmt0 /file1 /file2 2>> backup.log
Also, how will i trap if an error exists so i could have and If-Then-Else statement to display successful or unsuccessful backup?
thanks,