I have one file name start.sh in rinku directory. I want to move it to rinku1 directory. I also mantain log file. In the log file I want to write the the statement whenever the move is failed.
Example:
>echo `mv /rinku/me.tx ../rinku1` | tee -a log1
mv: me.tx: cannot access: No such file or directory
I want to write mv: me.tx: cannot access: No such file or directory into log1.
can't I use tee instead of >>. bcoz with this command mv: me.tx: cannot access: No such file or directory this line is not shown during runtime. I have to show it in runn time also.