Nested Bash Script
I'm trying to write a nested bash script that executes a bash command on another server using ssh.
Basically I'm doing this.
#/usr/bin/ssh -l user command\ logout
Now that works just fine until I start getting more advanced into bash scripting.
what I would LIKE to run on that server is
for i in `ls folder`; do cat folder/$i && echo '----'; done;
basically outputs the contents of everthing in a folder seperated by ----
if I try to run it as I normally would above, it tries to run the bash script locally. I've tried just about everything I can think of as far as using quotes to block portions off using backticks to seperate the ;'s and `'s out etc. If anyone knows how to do this, I could use some direction.
Thanks
|