Sponsored Content
Top Forums Shell Programming and Scripting sed or awk, cut, to extract specific data from line Post 302724575 by ocramas on Wednesday 31st of October 2012 11:41:44 PM
Old 11-01-2012
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,
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can't figure out how to display specific data from a line using awk.

Hello, I cannot figure this one out. I would like to do the following. I have a line that has 7 words. It is possible that the line can have 20 words too. I always want to show the 9th word and beyond. The 9th word will always change so I do not have something to search for, so I think... (1 Reply)
Discussion started by: ctcuser
1 Replies

2. 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

3. Shell Programming and Scripting

Extract specific data content from a long list of data

My input: Data name: ABC001 Data length: 1000 Detail info Data Direction Start_time End_time Length 1 forward 10 100 90 1 forward 15 200 185 2 reverse 50 500 450 Data name: XFG110 Data length: 100 Detail info Data Direction Start_time End_time Length 1 forward 50 100 50 ... (11 Replies)
Discussion started by: patrick87
11 Replies

4. 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

5. Shell Programming and Scripting

Line/Variable Editing for Awk sed Cut

Hello, i have a file, i open the file and read the line, i want to get the first item in the csv file and also teh third+6 item and wirte it to a new csv file. only problem is that using echo it takes TOO LONG: please help a newbie. below is my code: WorkingDir=$1 FileName=`cut -d ',' -f... (2 Replies)
Discussion started by: limamichelle
2 Replies

6. Shell Programming and Scripting

cut, sed, awk too slow to retrieve line - other options?

Hi, I have a script that, basically, has two input files of this type: file1 key1=value1_1_1 key2=value1_2_1 key4=value1_4_1 ... file2 key2=value2_2_1 key2=value2_2_2 key3=value2_3_1 key4=value2_4_1 ... My files are 10k lines big each (approx). The keys are strings that don't... (7 Replies)
Discussion started by: fzd
7 Replies

7. Shell Programming and Scripting

Router ping log extract data from it Awk/Sed/grep

Hi, I am new to this world.. Using expect i loging to router and checking ping response to my links. I need to genarate report using this output and that report contains only three file link name, packet loss, latency. my output of script is like below: -bash-3.00$ monmw/mwbkp... (2 Replies)
Discussion started by: jkmistry
2 Replies

8. Shell Programming and Scripting

Replace specific field on specific line sed or awk

I'm trying to update a text file via sed/awk, after a lot of searching I still can't find a code snippet that I can get to work. Brief overview: I have user input a line to a variable, I then find a specific value in this line 10th field in this case. After asking for new input and doing some... (14 Replies)
Discussion started by: crownedzero
14 Replies

9. Shell Programming and Scripting

sed / awk to get specific word in line

I have http log that I want to get words after specific "tag", this a sample line from the log: 98,POST,200 OK,www.facebook.com,Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1,/ajax/updatestatus.php?__a=1,datr=P_H1TgjTczCHxiGwdIF5tvpC; lu=Si1fMkcrU2SInpY8tk_7tAnw;... (6 Replies)
Discussion started by: erlanq
6 Replies

10. UNIX for Dummies Questions & Answers

using sed delete a line from csv file based on specific data in two separate fields

Hello, :wall: I have a 12 column csv file. I wish to delete the entire line if column 7 = hello and column 12 = goodbye. I have tried everything that I can find in all of my ref books. I know this does not work /^*,*,*,*,*,*,"hello",*,*,*,*,"goodbye"/d Any ideas? Thanks Please... (2 Replies)
Discussion started by: Chris Eagleson
2 Replies
LINUXDCPP(1)						      General Commands Manual						      LINUXDCPP(1)

NAME
LinuxDC++ - File-sharing client for the Direct Connect network SYNOPSIS
linuxdcpp [OPTION...] [URI...] DESCRIPTION
LinuxDC++ is a Direct Connect client based on DC++. Utilizing the latest DC++ core, LinuxDC++ offers similar functionality to the Windows client like segmented downloading, TTH based file integrity, etc. with a GTK+ user interface. LinuxDC++ is free and open source software licensed under the GPL. Direct Connect (DC) is a peer-to-peer (P2P) file-sharing protocol. Clients connect to a central hub where they can chat or share files with one another. Users can view other users' list of shared files or search the hub for files. OPTIONS
URI A list of URIs to load on startup. LinuxDC++ supports the following types of URIs: magnet:?xt=urn:tree:tiger:[TTH]&xl=[filesize]&dn=[filename] Magnet URI for a shared file. Handled the same as -a, --add-magnet adc://[hostname]:[port] ADC hub URI. Handled the same as -c, --connect adcs://[hostname]:[port] Secure ADC hub URI. Handled the same as -c, --connect dchub://[hostname]:[port] NMDC hub URI. Handled the same as -c, --connect -a, --add-magnet=URI Attempt to add the magnet link directly to the download queue -c, --connect=URI Connect to the given hub -e, --existing Send commands to the existing instance (if applicable) -h, --help Show help options -m, --search-magnet=URI Search for the given magnet link -r, --refresh Initiate filelist refresh -s, --show Show the running instance (default action) -v, --version Show version information and exit SEE ALSO
Homepage: https://launchpad.net/linuxdcpp AUTHOR
linuxdcpp is copyright Jens Oknelid <paskharen@gmail.com>. This manual page was written by the LinuxDC++ Team <linuxdcpp-team@lists.launchpad.net>. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foun- dation October 21, 2009 LINUXDCPP(1)
All times are GMT -4. The time now is 04:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy