Hi,
I'm having some problems with the auto execution option in gnome-terminal.
What I'm trying to do is this to start a new terminal, and run "ssh [ip] | tee -ai [log file]" automatically. I've tried two ways to accomplish this, nr 1:
Code:
gnome-terminal -e "ssh 10.80.250.239 | tee -ai ~/sshlogs/log-`date +%Y-%m-%d-%H%M%S`.log"
and nr 2:
Code:
gnome-terminal -x ssh 10.80.250.239 | tee -ai ~/sshlogs/log-`date +%Y-%m-%d-%H%M%S`.log
None of them works. In the first example ssh treats the | and everything after it as a command to execute on the remote server I'm SSHing to, it's like the | is escaped in some way.
In the second example everything seems to work, except that the log file is empty. I think that the output of the gnome-terminal is piped to tee, and the | is not passed to the new terminal window at all.
So my question is, how do get the | to be sent to the new terminal, and to be treated as a | there?
Thanks,
Zmegolaz