Re: ssh command passing
On Fri, Oct 24, 2003 at 11:00:17AM +0100, Rus Foster wrote:
> base-2.05a$ ssh remotehost find /home -name .bash_history -exec grep foo
> {} \;
> find: missing argument to `-exec'
>
> I've tried quoting it, escaping it..What am I doing wrong?
charlie@marvin:~$ ssh -l bss atsrvlx01 'find /home -name ".bash_history" -exec grep foo {}\;'
find: missing argument to `-exec'
charlie@marvin:~$ ssh -l bss atsrvlx01 'find /home -name ".bash_history" -exec grep foo {} \;'
grep: /home/bss/mailarchive_save/.bash_history: Permission denied
find: /home/bss/mailarchive_save/.ssh: Permission denied
grep: /home/bss/nagios.bak.new/.bash_history: Permission denied
find: /home/bss/nagios.bak.new/.ssh: Permission denied
grep: /home/bss/mailarchive_save_new/.bash_history: Permission denied
find: /home/bss/mailarchive_save_new/.ssh: Permission denied
charlie@marvin:~$
Is it like this in your case maybe?
(I added a space near the end between } and \ ... )
or like this:
charlie@marvin:~$ ssh -l bss atsrvlx01 find /home -name ".bash_history" -exec grep foo {} \;
find: missing argument to `-exec'
charlie@marvin:~$ ssh -l bss atsrvlx01 'find /home -name ".bash_history" -exec grep foo {} \;'
grep: /home/bss/mailarchive_save/.bash_history: Permission denied
find: /home/bss/mailarchive_save/.ssh: Permission denied
grep: /home/bss/nagios.bak.new/.bash_history: Permission denied
find: /home/bss/nagios.bak.new/.ssh: Permission denied
grep: /home/bss/mailarchive_save_new/.bash_history: Permission denied
find: /home/bss/mailarchive_save_new/.ssh: Permission denied
charlie@marvin:~$
?
HTH
charlie
--
Végh Károly - System Engineer - UTA - TIS.SAS.BSS
Don't worry. Everything is getting nicely out of control.
Reply to: