View Single Post
  #2 (permalink)  
Old 24-06-2009, 11:25 PM
jaysunn's Avatar
jaysunn jaysunn is offline
Powered By Linux
User
 
Join Date: Apr 2009
Location: 41.332032,-73.089775
OS: RHEL - OSX
Scripting language: BASH - Learning Ruby
Posts: 604
Thanks: 61
Thanked 80 Times in 72 Posts
Rep Power: 10
jaysunn is a splendid one to behold jaysunn is a splendid one to behold jaysunn is a splendid one to behold jaysunn is a splendid one to behold jaysunn is a splendid one to behold jaysunn is a splendid one to behold jaysunn is a splendid one to behold jaysunn is a splendid one to behold
Default Hello Sir

Please give this a try.

Code:
cat gps_log_file | grep GPRMC > data.txt
This will generate the following from your test data:
Code:
shine:bin jasonralph$ cat data1 | grep GPRMC 
$GPRMC,111503,A,0833.6323,N,07652.7685,E,0.1866,25 6.540,220609,,*2A
$GPRMC,111504,A,0833.6316,N,07652.7682,E,0.1866,25 6.540,220609,,*2C
$GPRMC,111505,A,0833.6328,N,07652.7684,E,0.1488,23 8.090,220609,,*2A
$GPRMC,111506,A,0833.6336,N,07652.7654,E,0.1866,25 6.540,220609,,*27
$GPRMC,111507,A,0833.6341,N,07652.7644,E,0.1866,25 6.540,220609,,*27
I created a file called data1 with your test data for the input file. Of course swap data1 file out for your log file.



Good Luck

Jaysunn
Reply With Quote