hi,
i want to put a set of commands inside a script and executing commands sequentially. there are 2 commands, the first command copies the program from my machine to another machine, execute it and get the result on my machine. the second command removes the program which was copied to the remote machine. I have already made the ssh authentication. I need to integrate both of them in one single script so that if i run that script it gives the result. Can somebody give some suggestions?
first command
cat /path of my machine/script.pl | ssh user@remotemachine "cat > /path of the remote server where the file is copied/backup_script.pl ; perl /path of the remote server where the file is copied/backup_script.pl
second command: removing the file after executing
ssh user@remotemachine rm /path of the remote server where the file is copied/backup_script.pl
thanks.