UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old November 9th, 2004, 12:57 PM
skilambi skilambi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 skilambi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #2  
Old November 10th, 2004, 12:46 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,077 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 13 h 40 m 11 sec
Reputation Power: 8
imo the probl is in 'snmpproj'
why you first write 'result1' and then append it to 'result' ?

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Pipelining output of a perl script to a results file using Crontab


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway