LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-31-2003, 11:54 PM   #1
usb1
LQ Newbie
 
Registered: Nov 2003
Posts: 17

Rep: Reputation: 0
Question New Year's Question


Hello. I have a DAT file that gets update it every 20 minutes . Now my question is , how can I make a script that will get those data and send it to an email every 1 hour. Or may be beter post it on a web address. The DAT file only has like three differents numbers separaded by commas.
 
Old 01-01-2004, 12:31 AM   #2
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
probably setup a cron job using a ftp command that reads its sequence in a file
 
Old 01-01-2004, 09:10 AM   #3
titanium_geek
Senior Member
 
Registered: May 2002
Location: Horsham Australia
Distribution: elementary os 5.1
Posts: 2,479

Rep: Reputation: 50
do a LQ search for cron job, cron etc.. there are some helpful posts out there.

titanium_geek
 
Old 01-01-2004, 09:22 AM   #4
usb1
LQ Newbie
 
Registered: Nov 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Arrow

Thank you all for the reply. Here is exacly what I want to do with better details....
I have a Linux server ( Netmax.com ), in there I have a folder that holds two .dat files ( Station#1_Public.dat" ) and ( Station#2_Public.dat" ). Those files updates
every 1 minute. In those files hold weather information such as temperature, wind speed, wind direction. Here is an example what is inside.

TOACI1","Station#1","Public"
"TMSTAMP","RECNBR","Batt_Volt","Wind_Speed","Wind_Direction","Temperature","Wind_Chill"
"2004-01-01 02:23:04",57458,12.7687044,0,35.1207504,57.6469803,57.6469803

In windows XP, I have a software that converts those numbers into easy to read info (Example on Bottom) and store the .dat file on the server (Netmax).

Batt_Volt : 12.76
Wind_Speed: 0
Wind_Direction: NE
Temperature: 57.64
Wind_Chill: 57.64

Now is there a way you can make a script that will grab those information and upload it into .html format . So that way I can go to that page with my cell phone or PDA
and read the info by going to that page?
 
Old 01-01-2004, 10:47 AM   #5
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
you don't need to convert it in html format. you can browse a text file on your browswer.

go see the man page of your command-line ftp client (ftp, ncftp...) and see how you can feed the connexion and transfer commands through a text file.

Then you set a cron job (look for a cron how-to or tutorial) at each minute to execute the ftp commands that reads the command file, and uploads your text file on a web server, using a .txt or .html extension.

I know exactly how to do all this, but you won't learn if I tell you everyting.

Write back if you have problems.

hth
 
Old 01-01-2004, 11:40 AM   #6
titanium_geek
Senior Member
 
Registered: May 2002
Location: Horsham Australia
Distribution: elementary os 5.1
Posts: 2,479

Rep: Reputation: 50
give him a hint: all I wanted to know was a simple thing, that was giving me grief, but they wouldn't tell me... I almost gave up in frustration...
moral: don't spoonfeed him, but give him a hint.

titanium_geek
 
Old 01-01-2004, 11:51 AM   #7
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
I believe I provided a sufficient amount of 'tips'. He'll try on his own, if he really cannot do it, I'll tell him.
 
Old 01-01-2004, 03:16 PM   #8
usb1
LQ Newbie
 
Registered: Nov 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Please Help..

Quote:
Originally posted by ugob

I know exactly how to do all this, but you won't learn if I tell you everyting.



hth
Can you please tell me how to do it?
 
Old 01-01-2004, 03:47 PM   #9
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
did you check the manpages of your ftp client?

did you search for cron/crond/crontab tutorials?
 
Old 01-01-2004, 11:24 PM   #10
usb1
LQ Newbie
 
Registered: Nov 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Yes and i dont know how to start with this.
 
Old 01-02-2004, 07:18 AM   #11
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
ok then what is your command-line ftp client?
what distro are you using?
 
Old 01-02-2004, 07:26 AM   #12
usb1
LQ Newbie
 
Registered: Nov 2003
Posts: 17

Original Poster
Rep: Reputation: 0
I typed ncftp and I got
NcFTP 3.0.3 (April 15, 2001) by Mike Gleason (ncftp@ncftp.com)
 
Old 01-02-2004, 08:55 AM   #13
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
Ok, then read the manpage for ncftpput

man ncftpput
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 04:23 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 01:51 PM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 02:02 PM
What's your New Year's Resolution? TheOneAndOnlySM General 35 01-02-2004 10:36 PM
Lilo/kernel question & font question phek Linux - General 9 09-18-2001 12:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration