Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
------------------------------------------------------------------------------------
FILES(){
if [ -d ~/ffiles ]then
print "The Directory ffiles exist"
if [ -r ~/bin/*.fdr ]
then
print "the ffile(s) exists and is/are readable....."
mv ~/bin/*.fdr ~/ffiles/
fi
else
print "The directory ~/ffiles doesn't exist. Creating the directory......."
mkdir ~/ffiles
print "The directory ~/ffiles is now created"
fi
}/usr/local/bin/ssh -q user1@server1 "FILES"
---------------------------------------------------------------------------------------Hello!
I wrote the above function in a script and i wanted to execute this one on a remote server. Can any one of you let me know how should i achieve this.
I want to pass this function through the ssh command.
I tried running the above script and I'm seing the following error
ksh: FILES: not found
-----------------------Please let me know how should i run this on a remote server?
Thanks

I have tested the above subroutine and it works well, bt i donno why it's not working when i call from ssh.

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |