I'm having an .sh which has this particular script in it:
scp -P 22 /somepath/testfrom/* user@server:~/somepath/testo
This basically copies all the files (but then I'm having only one file for testing purposes) from one server to another. I pretty much followed this tutorial and it absolutely worked when I ran the .sh file from the command line (ie ./script.sh).
So I tried to execute this as a
cron job where I appended a line in
crontab -e as:
* * * * * /home/chamith/work/ELK/scripts/script.sh
I've been cracking my head on this, it didn't work at all! Where as running the script as a file from the command line worked perfectly.
Where am I going wrong? Any helpd could be appreciated.