The UNIX and Linux Forums  


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
URGENT: Script/Function needed to read text property files in block wise ysreenivas Shell Programming and Scripting 7 05-11-2009 04:08 AM
Insert text between delimiter ystee Shell Programming and Scripting 5 03-06-2008 06:42 PM
Formatting a text file based on newline and delimiter characters ntekupal Shell Programming and Scripting 5 05-11-2007 04:33 PM
How to parse a text file with \034 as field and \035 as end of message delimiter? indianya Shell Programming and Scripting 1 08-26-2005 10:20 PM
grep multiple text files in folder into 1 text file? coppertone UNIX for Dummies Questions & Answers 7 08-23-2002 03:50 PM

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 04-30-2006
bjsellt bjsellt is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 1
Question How delimiter in text files..urgent!!! please

hi,
I want the result just date,time,%loss, and average. I stored the results of ping test in text files. How can I grep all of them and keep the result in another file ?
this is example:

Mon 04/03/2006
12:00 AM

Pinging 01.123.213.36 with 32 bytes of data:

Reply from 01.123.213.36: bytes=32 time=30ms TTL=252

Reply from 01.123.213.36: bytes=32 time=26ms TTL=252

Reply from 01.123.213.36: bytes=32 time=21ms TTL=252

Reply from 01.123.213.36: bytes=32 time=16ms TTL=252

Reply from 01.123.213.36: bytes=32 time=38ms TTL=252

Reply from 01.123.213.36: bytes=32 time=37ms TTL=252

Reply from 01.123.213.36: bytes=32 time=18ms TTL=252

Reply from 01.123.213.36: bytes=32 time=29ms TTL=252

Reply from 01.123.213.36: bytes=32 time=24ms TTL=252

Reply from 01.123.213.36: bytes=32 time=18ms TTL=252



Ping statistics for 01.123.213.36:

Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 16ms, Maximum = 38ms, Average = 25ms

thanks!
  #2 (permalink)  
Old 04-30-2006
Santi Santi is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 23
Hello,

Try with fping [1] network utility instead of standar UNIX ping command.. here is a little example and her output:

Quote:
$ fping -C 1 -q 192.168.0.2
192.168.0.2 : 0.54
I think that this fping's output is more simple to parse with awk, sed, etc.. and to storage in a variable..

For the date you can use traditional date command:

Quote:
$ date +"%Y-%m-%d %H:%M:%S"
2006-04-30 13:56:49
Regards,

[1] http://www.fping.com/

--
Santi Saez
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 05:24 AM.


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