[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh and many command line



On Tuesday 12 August 2003 14:19, François Chenais wrote:
> Can U try  this ?
>
>
> ssh  helios@kafka "for name in `cat /etc/passwd | awk -F : '{ print $1}'`;
> do echo $name; crontab -u name -l; done;"
>
>

I'm starting to get your point, it seems that when starting to use the for or 
variables things start to get strange 

-> this works 
helios@kafka:~$ for name in `cat /etc/passwd | sed s/:.*//`; do echo $name; 
done                                 
root
daemon
bin
sys
sync
games
man
-> works also
helios@kafka:~$ ssh void@localhost "echo \"`cat /etc/passwd | sed s/:.*//`\""
void@localhost's password:
root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
proxy
postgres

-> but using bash builtins fails.
Anybody else and idea ?



Reply to: