Sponsored Content
Top Forums Shell Programming and Scripting Pulling data by GPS coordinates from text file Post 302503469 by Mikey on Thursday 10th of March 2011 05:21:16 PM
Old 03-10-2011
Question

Quote:
Originally Posted by joeyg
What about your 3rd line?
Code:
grep '!38'

will not capture, but would appear to be valid.

Lines like 3rd and 10th are to be ignored?
I will have to go back and visit those items. I was looking through the database and found these preceding the coords :
! and = anything else appears to be bad data because of poor data entry at the end point. I'm not interested in that.

---------- Post updated at 05:21 PM ---------- Previous update was at 04:08 PM ----------

<code>
awk -F'!' '{lat=substr($2,1,2); lon=substr($2,10,3); (lat >36 && lat <39) && (lon > -75 && lon < -84) print lat"--"lon}' < net.log
</code>
The above code is what I have tried without success.

The only two valid items ahead of the lat is either ! or = nothing else.

Quote:
Originally Posted by Mikey
I will have to go back and visit those items. I was looking through the database and found these preceding the coords :
! and = anything else appears to be bad data because of poor data entry at the end point. I'm not interested in that.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pulling data and following lines from file

I saw a few posts close to what i want to do, but they didn't look like they would work exactly.. or I need to think out of the box on this. I have a file that I keep server stats in for my own performance analysis. this file has the output from many commands in it (uptime, vmstats, ps, swap... (2 Replies)
Discussion started by: MizzGail
2 Replies

2. Shell Programming and Scripting

shell script to insert data from gps.txt to mysql database

Hi, I have gps receiver, by using gpsd data i can read gps log data to my database(my sql). Steps: 1. telenet localhost 2947 > gps.txt (press enter) 2. r (press enter) //then i will get the data like below in gps.txt file Trying 127.0.0.1... Connected to localhost.... (1 Reply)
Discussion started by: gudivada213
1 Replies

3. Shell Programming and Scripting

Writing a program to receive the GPS data and send to other server

Hi, I would like to write a program to receive the GPS data and then send the data via network to other program. All of the program is not write yet(include host and sender) All of the server OS is unix or linux Could you mind to give me some idea to do this? Thanks so much! Ken ... (2 Replies)
Discussion started by: kenlok
2 Replies

4. Shell Programming and Scripting

SFTP to server, pulling data and removing the data

Hi all, I have the following script, but are not too sure about the syntax to complete the script. In essence, the script must connect to a SFTP server at a client site with username and password located in a file on my server. Then change to the appropriate directory. Pull the data to the... (1 Reply)
Discussion started by: codenjanod
1 Replies

5. Shell Programming and Scripting

Pulling data from xml

Hi there, Please could anyone help with this. I have an xml file that contains repeating values eg <Rule name> AAAAA <Action> BBBBB </Action> <Data> CCCCC </Data> <Type> DDDDD </Type> </Rule name> <Rule name> A1A1A1A1 <Action> B1B1B1B1 </Action> <Data> C1C1C1C </Data> <Type>... (4 Replies)
Discussion started by: ssideel
4 Replies

6. Shell Programming and Scripting

BASH- Need help pulling data from .emlx

Hello, fellow computer junkies. First time poster! My boss wrote an application (Mavericks 10.9, Mountain Lion 10.8) that checks a user's security settings. The user runs the application, then it spits out an email that is sent back to our inbox showing the results. On our end, we have a mail rule... (5 Replies)
Discussion started by: sudo
5 Replies

7. Shell Programming and Scripting

Reducing the decimal points of numbers (3d coordinates) in a file; how to input data to e.g. Python

I have a file full of coordinates of the form: 37.68899917602539 58.07500076293945 57.79100036621094 The numbers don't always have the same number of decimal points. I need to reduce the decimal points of all the numbers (there are 128 rows of 3 numbers) to 2. I have tried to do this... (2 Replies)
Discussion started by: crunchgargoyle
2 Replies

8. Shell Programming and Scripting

Pulling Data, Then Moving to the Next File

I'm scanning a list of emails- I need to pull 2 pieces of data, then move to the next file: Sender's Email Address Email Date I need these to be outputted into a single column- separated by a ",". Like this: Email1's Address, Email1's Date Stamp Email2's Address, Email2's Date Stamp... (4 Replies)
Discussion started by: sudo
4 Replies

9. Shell Programming and Scripting

Pulling information from a data file by date

awk -v now="$(date +%s)" -v tDiff="${USERMINUTES}" ' BEGIN { FS="=" if (!now) now=systime() if (!tDiff) tDiff=60*60 p=1 } /{/ {rec=$0;p=1;next} /}/ && rec && p {print rec ORS $0;next} $1=="entry_time" { if (now-$2>tDiff)p=0 } {rec=rec ORS $0}'... (6 Replies)
Discussion started by: SkySmart
6 Replies
Geo::GoogleEarth::Pluggable::Plugin::Others(3pm)	User Contributed Perl Documentation	  Geo::GoogleEarth::Pluggable::Plugin::Others(3pm)

NAME
Geo::GoogleEarth::Pluggable::Plugin::Others - Geo::GoogleEarth::Pluggable Others Plugin Methods SYNOPSIS
use Geo::GoogleEarth::Pluggable; my $document=Geo::GoogleEarth::Pluggable->new; my @point=$document->MultiPoint(%data); #() my $point=$document->MultiPoint(%data); #[] METHODS
Methods in this package are AUTOLOADed into the Geo::GoogleEarth::Pluggable::Folder namespace at runtime. MultiPoint my @point=$document->MultiPoint( name=>"Point", #SCALAR sprintf("%s (%s)", $name, $index) coordinates=>[{}, {}, ...], #CODE ($index, $point) #TODO#name=>["pt1", "pt2", ...], #ARRAY #TODO#name=>sub{sprintf("Point %s is a %s", shift, ref(shift))}, ); Note: Currently coordinates must be {lat=>$lat, lon=>$lon, alt=>$alt} TODO: Coordinates can be any format supported by Placemark->coordinates TODO
BUGS
Please log on RT and send to the geo-perl email list. SUPPORT
DavisNetworks.com supports all Perl applications including this package. AUTHOR
Michael R. Davis (mrdvt92) CPAN ID: MRDVT COPYRIGHT
This program is free software licensed under the... The BSD License The full text of the license can be found in the LICENSE file included with this module. SEE ALSO
Geo::GoogleEarth::Pluggable perl v5.14.2 2010-12-27 Geo::GoogleEarth::Pluggable::Plugin::Others(3pm)
All times are GMT -4. The time now is 07:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy