Hi all,
I've been working on a bash script to help with backups that I have to do at work.
One of the lines in the script is supposed to launch an xterm, log into a specific server node and launch a tar backup to tape. This part works ok, but I've been trying to get stdout and stderr to display in the xterm and output to a log file using tee.
To this end, this is my current code:
xterm -hold -e "rsh amaqc01 tar -cvML471859200 -f amatap0"$tape_nd":/dev/st"$tape_dr" /dir1/dir2 2>&1 | foo/bar.txt" &
When the script launches this though, the xterm presents an 'Ambiguous output redirect' error.
I suspect that this is actually due to the system using csh as the default shell such that the xterm is actually running csh rather than bash.
I've tried
xterm -hold -e "bash; rsh amaqc01"
to fix this but this seems to end up opening the xterm, running the rsh and THEN running bash.
So I guess my question is, what am I missing? Is it even possible to achieve what I'm trying and if so, how?
Thanks in advance