Why when I run the command
gnome-terminal -e "ssh -t sv \"cd ~/tmp/perl_libs/bin; bash /usr/bin/tail -f ~/open; echo 'YES'; exec $SHELL\""`
I got
/usr/bin/tail: cannot execute binary file
All you need to is remove the bash in front of the tail. As shown in
tail is a ELF file. Not a bash script. |
|||
|
tail -f
is unlikely to exit, so your YES will never get printed and your target$SHELL
won't be run. Perhaps you intend just to show the last few lines on the file, in which case omit the-f
. – roaima Mar 1 at 12:22bash -i
command prevents that. So I may CTRL+C to exit fromtail -f
. The question were 'why I can not run command with bash' and I get sharp answer – Eugen Konkov Mar 1 at 12:27tail -f
, and warned you of the issue. You're happy with using Ctrl/C to end thetail -f
process, so that's fine. – roaima Mar 1 at 12:30tail
isNot a bash script
– Eugen Konkov Mar 1 at 12:43