Sponsored Content
Top Forums Shell Programming and Scripting extract a particular start and end pattern from a line Post 302165196 by pt14 on Thursday 7th of February 2008 02:52:42 AM
Old 02-07-2008
Quote:
Originally Posted by Franklin52
Code:
Echo 'Updated: IPTel\platform\core\include\RTCPBase.h \main\MWS2051_Sablime_Int\1 \main\MWS2051_Sablime_Int\IPT2_8_SP1_Integration\1' | awk '{print $2}'

Gives what you expect: IPTel\platform\core\include\RTCPBase.h

Regards
Echo 'Updated: IPTel\platform\core\include\RTCPBase.h \main\MWS2051_Sablime_Int\1 \main\MWS2051_Sablime_Int\IPT2_8_SP1_Integration\1' | awk -F" " '{print $2}'
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed: Find start of pattern and extract text to end of line, including the pattern

This is my first post, please be nice. I have tried to google and read different tutorials. The task at hand is: Input file input.txt (example) abc123defhij-E-1234jslo 456ujs-W-abXjklp From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Discussion started by: TestTomas
5 Replies

2. UNIX for Dummies Questions & Answers

Extract a specific number from an XML file based on the start and end tags

Hello People, I have the following contents in an XML file ........... ........... .......... ........... <Details = "Sample Details"> <Name>Bob</Name> <Age>34</Age> <Address>CA</Address> <ContactNumber>1234</ContactNumber> </Details> ........... ............. .............. (4 Replies)
Discussion started by: sushant172
4 Replies

3. UNIX for Dummies Questions & Answers

Lynx Grep Pattern Match 2 conditions Print from Start to End

I am working on a scraping project and I am stuck at this tiny grep pattern match. Sample text : FPA List. FPA List. FPA List. FPA List. FPA List. FPA List. FPA List. FPA List. ABC Personal Planning Catherine K. Wat Cath Wat Catherine K. Wat Catherine K. Wat IFRAME:... (8 Replies)
Discussion started by: kkiran
8 Replies

4. Shell Programming and Scripting

Extract week start,end date from given date in PERL

Hi All, what i want to do in perl is i should give the date at run time .Suppose date given is 23/12/2011(mm/dd/yyyy) the perl script shold find week start date, week end date, previous week start date,end date,next week start date, end date. In this case week start date will be-:12/19/2011... (2 Replies)
Discussion started by: parthmittal2007
2 Replies

5. Shell Programming and Scripting

Search for a pattern,extract value(s) from next line, extract lines having those extracted value(s)

I have hundreds of files to process. In each file I need to look for a pattern then extract value(s) from next line and then search for value(s) selected from point (2) in the same file at a specific position. HEADER ELECTRON TRANSPORT 18-MAR-98 1A7V TITLE CYTOCHROME... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies

6. UNIX for Dummies Questions & Answers

extract regions of file based on start and end position

Hi, I have a file1 of many long sequences, each preceded by a unique header line. file2 is 3-columns list: headers name, start position, end position. I'd like to extract the sequence region of file1 specified in file2. Based on a post elsewhere, I found the code: awk... (2 Replies)
Discussion started by: pathunkathunk
2 Replies

7. Shell Programming and Scripting

awk to count start and end keyword in a line

Hello fellow awkers and seders: need to figure out a way to ensure a software deployment has completed by checking its trace file in which I can store the deployment results as follows: echo $testvar ===== Summary - Deploy Result - Start ===== ===== Summary - Deploy Result - End =====... (1 Reply)
Discussion started by: ux4me
1 Replies

8. Shell Programming and Scripting

Grep start and end line of each segments in a file

Cat file1 -------- ---------- SCHEMA.TABLE1 insert------- update----- ------------- ---------- SCHEMA.TABLE2 insert------- update----- ----------- ------------ SCHEMA.TABLE3 insert------- update----- ------------ grep -n SCHEMA > header_file2.txt (2 Replies)
Discussion started by: Veera_V
2 Replies

9. Shell Programming and Scripting

How to extract start/end times from log file to CSV file?

Hi, I have a log file (log.txt) that which contains lines of date/time. I need to create a script to extract a CSV file (out.csv) that gets all the sequential times (with only 1 minute difference) together by stating the start time and end time of this period. Sample log file (log.txt) ... (7 Replies)
Discussion started by: Mr.Zizo
7 Replies

10. Shell Programming and Scripting

Printing string from last field of the nth line of file to start (or end) of each line (awk I think)

My file (the output of an experiment) starts off looking like this, _____________________________________________________________ Subjects incorporated to date: 001 Data file started on machine PKSHS260-05CP ********************************************************************** Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
TCPSPRAY(1)							   User's Manual						       TCPSPRAY(1)

NAME
tcpspray - TCP/IP bandwidth measurement tool (Discard and Echo client) SYNOPSIS
tcpspray [-46ev] [-b block_size] [-d wait_us] [ -f filename] [-n count] <hostname> [port] DESCRIPTON
tcpspray uses the Discard resp. Echo protocol (RFC 863 resp. RFC 862) to perform bandwidth measurements of TCP sessions between the local system, and a Discard resp. Echo server. Unix-based hosts can provide a Discard and/or Echo servers with the Internet super-server inetd. On Windows NT, the simple network proto- cols optional component will do the same. The name or address of the server node must be specified. tcpspray will automatically try to use IPv6 when available. If not, or if it fails, it will fallback to IPv4. However, tcpspray4 resp. tcpspray6 only try to use IPv4 resp. IPv6. OPTIONS
-4 or --ipv4 Force usage of TCP over IPv4. -6 or --ipv6 Force usage of TCP over IPv6. -b block_size or --bsize block_size Send block of the specified byte size (default: 1024). -d wait_us or --delay wait_us Waits for the given amount of microseconds after any given was sent before attempting to send the next one. There is no delay by default. -e or --echo Use the Echo protocol instead of Discard. tcpspray will measure the time required to send data and receive it back, instead of sim- ply sending it. -f filename or --fill filename Read data from the specified file to fill sent blocks with. If the file is smaller than the size of blocks, or if no file were spec- ified, the remaining trailing bytes are all set to zero. -h or --help Display some help and exit. -n block_count or --count block_count Send the specified amount of data blocks for the measurements (default: 100). -V or --version Display program version and license and exit. -v or --verbose Display more verbose informations. In particular, tcpspray will print a dot each time a block is sent. If the Echo protocol is used (option -e), dots will be erased as data is received back. DIAGNOSTICS
If you get no response while you know the remote host is up, it is most likely that it has no Discard/Echo service running, or that these services are blocked by a firewall. Running tcptraceroute6(8) resp. tcptraceroute(8) toward the IPv6 resp. IPv4 remote host might help detecting such a situation. SECURITY
tcpspray does not require any privilege to run. SEE ALSO
tcp(7), inetd(8), tcptraceroute6(8), tcptraceroute(8) AUTHOR
Remi Denis-Courmont <remi at remlab dot net> $Id: tcpspray.1 658 2010-10-31 20:56:30Z remi $ http://www.remlab.net/ndisc6/ tcpspray $Date: 2010-10-31 22:56:30 +0200 (dim. 31 oct. 2010) $ TCPSPRAY(1)
All times are GMT -4. The time now is 09:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy