it does not work at all now, cause it put cmd in bg before the read has been done... :S
> jobs
[3] + Running while read n m ; do;remsh ${m%:} "ls -d /$n" &;done < text
[2] - Running while read n m ; do;remsh ${m%:} "ls -d /$n" &;done < text
[1] Running while read n m ; do;remsh ${m%:} "ls -d /$n" &;done < text
---------- Post updated at 11:55 AM ---------- Previous update was at 11:52 AM ----------
yes, they exists, and I've to use remsh, so no verbose mode possible.
---------- Post updated at 12:10 PM ---------- Previous update was at 11:55 AM ----------
arf... probably I've mistaped something the first time I execute my script, caus it works (not fine, cause it search everytime on everyserver everyline...)
so, this works (not fine):
for n in `awk -F: '{print $1}' text`; do
for m in `awk -F: '{print $2}' text`; do
remsh $n "ls -d /$m"
done
done
I prefer this one (works fine):
for n in `cat text`; do
ser = `echo $n | awk -F: '{print $1}'`
dir = `echo $n | awk -F: '{print $2}'`
remsh $ser "ls -d /$dir"
done
thank you mirni (and I don't understand why your while doesn't work)