I have a script where it finds the most current modified file in a directory, transfers that file into another server, then run a script which is on that another server.
I can find the file and transfer it fine, but when it comes to running the script on the other server, it just doesn't work.
The error message says that there is no such file or directory, which I'm assuming that the script doesn't even look in the other server when it tries to run this line.
Here is what I have so far:
#!/bin/sh
FILENAME=$(ls -1 -t --escape /opt/logs/|head -1)
scp -i /home/nessus "/opt/sc4/admin/logs/$FILENAME" acsv_nessus\@server:/opt/Data
acsv_nessus\@CAVTSASL717:/home/nessus/run_data
#end of script
Many thanks for any feedback!