I have a Korn script that runs nightly that I'm trying to get to display to both the screen and write to an output file. I thought I could just use the "tee" command but I keep getting an empty file. In my script I have:
#!/bin/ksh
DATE=$(date +%m%d%y)
ksh -x str_process_main | tee /tmp/str_process_${DATE}.txt
...I thought that this would just run the "str_process_main" script, display it to the terminal and write it to a file?
#!/bin/ksh
DATE=$(date +%m%d%y)
ksh -x str_process_main | tee /tmp/str_process_${DATE}.txt
...I thought that this would just run the "str_process_main" script, display it to the terminal and write it to a file?