The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Client-server kanexxx Shell Programming and Scripting 3 11-25-2008 01:05 AM
Server client program pip3r High Level Programming 9 04-17-2008 01:15 AM
copy file from server to client script gini Shell Programming and Scripting 5 12-11-2006 03:29 AM
client/server bole UNIX for Dummies Questions & Answers 2 10-30-2006 02:19 AM
ntp server and ntp client bubba112557 SUN Solaris 1 05-10-2005 10:37 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-18-2009
c0mrade c0mrade is offline
Registered User
  
 

Join Date: May 2008
Posts: 35
Client-server script

Hi all,

I am referring to this website . What I'm trying to do is to have a server script which will receive data from GPS in one line and store it in some file. Now from what I can see in this server file, server is sending the data to client but I don't need that .. I need only server script to receive data and pass it to some txt file or whatever, but also need to keep that file alive if multiple lines get sent to server. Any hints ? Opinions, I'm willing to consider any opinion, I've made this work on windows with visual basic but I really want to setup linux or bsd server to handle this kind of operation.

Thank you,
C
  #2 (permalink)  
Old 03-18-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,862
Did you read that website? The server described there is written in C, not a shell script, since shells usually can't do socket operations (bash can do them, but that's more of an exception than anything AFAIK)
How exactly will the data be transfered from the GPS device to the computer? Is the connection initiated by the device or the computer? Is any conversion of the data necessary? Is the connection IP based (Ethernet/WiFi/Firewire) or something like USB or RS232?
  #3 (permalink)  
Old 03-18-2009
c0mrade c0mrade is offline
Registered User
  
 

Join Date: May 2008
Posts: 35
pludi:

The GPS device establishes a connection to my server by connecting to its IP and PORT and then send data in one line. I do not need to decode the data, all I need is to save it in a file.
  #4 (permalink)  
Old 03-18-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,862
Scroll down in Beej's guide, to the simple stream client & take a look at how it receives from the server. Basically, all you need to do is change the servers send() to the appropriate recv() call & write the line to an open file descriptor.
Closed Thread

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0