
November 9th, 2004, 12:57 PM
|
|
Registered User
|
|
Join Date: Nov 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Pipelining output of a perl script to a results file using Crontab
Hey guys,
I have a perl script that uses SNMP to query a wireless access point and retieve data from the device. I want to output the results of the script to a results file everday at 6PM. I used crontab to do that. This is the code in the file
0 18 * * * /home/hyperion/k/kilambis/Project/execute
Execute is a shell script that has the following code
#!/bin/bash
perl -w /home/hyperion/k/kilambis/Project/snmpproj > /home/hyperion/k/kilambis/P
roject/results1.txt
cat /home/hyperion/k/kilambis/Project/results1.txt >> /home/hyperion/k/kilambis/P
roject/results.txt
When this is executed for some reason the code of my Perl Script also gets appended to results.txt. Does anyone know whats going on?
Thanks in advance
Regards,
Sai.
|