Sponsored Content
Top Forums Shell Programming and Scripting Router ping log extract data from it Awk/Sed/grep Post 302555829 by Chubler_XL on Thursday 15th of September 2011 06:12:14 PM
Old 09-15-2011
How about this:

Code:
awk '/^###/ {LINK=$2}
/packet loss/ { PL=$(NF-2) }
/^round-trip/ { print LINK OFS PL OFS $(NF-1) }' infile

This User Gave Thanks to Chubler_XL For This Post:
 

10 More Discussions You Might Find Interesting

1. IP Networking

cannot ping router from sgi irix

anyone available to help me config sgi octane to netscape and networking mac os X? i have three macs and one sgi. setup on a dsl netopia router. all 4 computers can ping each other by addresses and by names. all the macs can ping the router, but the sgi cannot ping the router, "network is... (0 Replies)
Discussion started by: eidde
0 Replies

2. Solaris

I can't ping my linksys router from Ultra 10

To begin with, I am a Solaris newbie; however, I am very familiar with Linux. Until I began working with Solaris, I didn't realize how much more difficult networking Solaris is than Linux. Before submitting this question, I have tried to fix this problem myself. After days of research, I still... (3 Replies)
Discussion started by: cstovall
3 Replies

3. UNIX for Advanced & Expert Users

WEB Server Log File Analysis using awk/sed/grep

I'm trying to find a way to show large page sizes (page size in K) from multiple web server log files. Essentially I want to show only rows from a file where a specific column is larger than some value. Has anyone ever done this type of log analysis? If so, a snippet of code would be very... (2 Replies)
Discussion started by: mike_cataldo@ad
2 Replies

4. Shell Programming and Scripting

Big data file - sed/grep/awk?

Morning guys. Another day another question. :rolleyes: I am knocking up a script to pull some data from a file. The problem is the file is very big (up to 1 gig in size), so this solution: for results in `grep "^\ ... works, but takes ages (we're talking minutes) to run. The data is held... (8 Replies)
Discussion started by: dlam
8 Replies

5. Shell Programming and Scripting

sed or awk to extract data from Xml file

Hi, I want to get data from Xml file by using sed or awk command. I want to get the following result : mon titre 1;Createur1;Dossier1 mon titre 1;Createur1;Dossier1 and save it in cvs file (fichier.cvs). FROM this Xml file (test.xml): <playlist version="1"> <trackList> <track>... (1 Reply)
Discussion started by: yeclota
1 Replies

6. IP Networking

tcp n00b - can't ping router

please help! I have a sun blade with 2 x nics configured, both on different subnets. The eri0 interface (192.168.0.100) is connected to my router (192.168.0.1), but if i try to ping the router, it times out. any suggestions are welcome - i noticed the 2 mac addresses are the same, i've set... (7 Replies)
Discussion started by: badoshi
7 Replies

7. UNIX for Advanced & Expert Users

bash/grep/awk/sed: How to extract every appearance of text between two specific strings

I have a text wich looks like this: clid=2 cid=6 client_database_id=35 client_nickname=Peter client_type=0|clid=3 cid=22 client_database_id=57 client_nickname=Paul client_type=0|clid=5 cid=22 client_database_id=7 client_nickname=Mary client_type=0|clid=6 cid=22 client_database_id=6... (3 Replies)
Discussion started by: Pioneer1976
3 Replies

8. Shell Programming and Scripting

Use grep sed or awk to extract string from log file and put into CSV

I'd like to copy strings from a log file and put them into a CSV. The strings could be on different line numbers, depending on size of log. Example Log File: File = foo.bat Date = 11/11/11 User = Foo Bar Size = 1024 ... CSV should look like: "foo.bat","11/11/11","Foo Bar","1024" (7 Replies)
Discussion started by: chipperuga
7 Replies

9. Shell Programming and Scripting

sed or awk, cut, to extract specific data from line

Hi guys, I have been trying to do this, but... no luck so maybe you can help me. I have a line like this: Total Handled, Received, on queue Input Mgs: 140 / 14 => 0 I need to, get the number after the / until the =, to get only 14 . Any help is greatly appreciated. Thanks, (4 Replies)
Discussion started by: ocramas
4 Replies

10. Shell Programming and Scripting

sed / awk / grep to extract information from log

Hi all, I have a query that runs that outputs data in the following format - 01/09/12 11:43:40,ADMIN,4,77,Application Group Load: Name(TESTED) LoadId(5137-1-0-1XX-15343-15343) File(/dir/dir/File.T03.CI2.RYR.2012009.11433350806.ARD) InputSize(5344) OutputSize(1359) Rows(2) Time(1.9960)... (8 Replies)
Discussion started by: jeffs42885
8 Replies
LINK(3) 								 1								   LINK(3)

link - Create a hard link

SYNOPSIS
bool link (string $target, string $link) DESCRIPTION
link(3) creates a hard link. PARAMETERS
o $target - Target of the link. o $link - The link name. RETURN VALUES
Returns TRUE on success or FALSE on failure. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.0 | | | | | | | This function is now available on Windows plat- | | | forms (Vista, Server 2008 or greater). | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 Creating a simple hard link <?php $target = 'source.ext'; // This is the file that already exists $link = 'newfile.ext'; // This the filename that you want to link it to link($target, $link); ?> NOTES
Note This function will not work on remote files as the file to be examined must be accessible via the server's filesystem. Note For Windows only: This function requires PHP to run in an elevated mode or with the UAC disabled. SEE ALSO
symlink(3), readlink(3), linkinfo(3). PHP Documentation Group LINK(3)
All times are GMT -4. The time now is 10:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy