Long story short, I have to get my Kubuntu computer to run a script that will access our FreeBSD server, retrieve some login logs from the previous day, and then e-mail them to someone else using my Kubuntu workstation. I'm a raw novice at this, and I'm sure there's a better way, but I can't find it. Here's the crontab on my machine (details hidden to protect the info):
It works when I run it from the command prompt in Konsole (minus the slashes in front of "+\%Y-\%m-\%d"), but when the crontab runs in the morning, the recipient only receives an "=" sign. My much more experienced co-worker and my boss can't figure out why it's not working, either. I can't find anything on the Internet that pertains to this specifically. Any help will be greatly appreciated.
Code:
0 8 * * * ssh <freebsd server> 'grep "Authentication SUCCESS" <directory>xx.xx.xx.x*/<logname>.log | grep `date -v-1d "+\%Y-\%m-\%d"` |
cut -d "[" -f 2 | cut -d "]" -f 1 | sort | uniq -c' | mail -s "Yesterday's Success Log" [email]person@place.com[/email]
It works when I run it from the command prompt in Konsole (minus the slashes in front of "+\%Y-\%m-\%d"), but when the crontab runs in the morning, the recipient only receives an "=" sign. My much more experienced co-worker and my boss can't figure out why it's not working, either. I can't find anything on the Internet that pertains to this specifically. Any help will be greatly appreciated.