Sponsored Content
Top Forums Shell Programming and Scripting Extract specific line in an html file starting and ending with specific pattern to a text file Post 302915515 by dejavo on Wednesday 3rd of September 2014 02:05:26 PM
Old 09-03-2014
Extract specific line in an html file starting and ending with specific pattern to a text file

Hi
This is my first post and I'm just a beginner. So please be nice to me.

I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource[number].dat" is present on every 241st line. How do I extract this to a new text file?
I have tried
Code:
sed -n 241,241p sample.htm >>store.txt

But it results in the complete line getting extracted.

Please help.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extract some specific text file urgent pls

i have a big text file . i want to create new file as extract some specific text from the big file i am using hp ux please help (2 Replies)
Discussion started by: reyazan
2 Replies

2. Shell Programming and Scripting

Extract specific pattern from a file

Hi All, I am a newbie to Shell Scripting. I have a File The Server Name XXX002 ------------------------- 2.1 LAPD Iface Id Link MTU Side ecc_3_1 4 Up 512 User ecc_3_2 5 Up 512 User The Server Name XXX003 ------------------------- 2.1 LAPD (4 Replies)
Discussion started by: athreyavc
4 Replies

3. Shell Programming and Scripting

extract the lines between specific line number from a text file

Hi I want to extract certain text between two line numbers like 23234234324 and 54446655567567 How do I do this with a simple sed or awk command? Thank you. ---------- Post updated at 06:16 PM ---------- Previous update was at 05:55 PM ---------- found it: sed -n '#1,#2p'... (1 Reply)
Discussion started by: return_user
1 Replies

4. Shell Programming and Scripting

How can i break a text file into parts that occur between a specific pattern

How can i break a text file into parts that occur between a specific pattern? I have text file having various xml many tags like which starts with the tag "<?xml version="1.0" encoding="utf-8"?>" . I have to break the whole file into several xmls by looking for the above pattern. All the... (9 Replies)
Discussion started by: abhinav192
9 Replies

5. Shell Programming and Scripting

extract specific line if the search pattern is found

Hi, I need to extract <APPNUMBER> tag alone, if the <college> haas IIT Chennai value. college tag value will have spaces embedded. Those spaces should not be suppresses. My Source file <Record><sno>1</sno><empid>E0001</empid><name>Rejsh suderam</name><college>IIT ... (3 Replies)
Discussion started by: Sekar1
3 Replies

6. Shell Programming and Scripting

perform some operation on a specific coulmn starting from a specific line

I have a txt file having rows and coulmns, i want to perform some operation on a specific coulmn starting from a specific line. eg: 50.000000 1 1 1 1000.00000 1000.00000 50000.000 19 19 3.69797533E-07 871.66394 ... (3 Replies)
Discussion started by: shashi792
3 Replies

7. Shell Programming and Scripting

Help with remove last text of a file that have specific pattern

Input file matrix-remodelling_associated_8_ aurora_interacting_1_ L20 von_factor_A_domain_1 ATP_containing_3B_ . . Output file matrix-remodelling_associated_8 aurora_interacting_1 L20 von_factor_A_domain_1 ATP_containing_3B . . (3 Replies)
Discussion started by: perl_beginner
3 Replies

8. Shell Programming and Scripting

Extract Specific pattern - log file

Hello everyone, I am on AIX (6.1). I can only use shell (ksh) script. I can't do this on my own, so will do my best to explain my needs.I also do not know what is the best idea to make it work, so here is what I am thinking, but I may wrong. I need help to extract info on... (3 Replies)
Discussion started by: Aswex
3 Replies

9. Shell Programming and Scripting

Match all lines in file where specific text pattern is less than

In the below file I am trying to grep or similar, all lines where only AF= is less than 0.4.. Thank you :). grep grep "AF=" ,+ .4 file file 12 112036782 . T C 34.0248 PASS ... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. Shell Programming and Scripting

Rename text file with a specific pattern in directory

I am trying to rename all text files in a directory that match a pattern. The current command below seems to be using the directory path in the name and since it already exists, will not do the rename. I am not sure what I am missing? Thank you :). Files to rename in... (3 Replies)
Discussion started by: cmccabe
3 Replies
MASSAGEVENDOR(8)					      System Manager's Manual						  MASSAGEVENDOR(8)

NAME
massagevendor - convert the ethernet vendor codes master list to arpwatch format SYNOPSIS
massagevendor vendorfile DESCRIPTION
massagevendor is a program that converts a text file containing ethernet vendor codes into a format suitable for use by arpwatch(8) and arpsnmp(8). The input vendorfile is a master text file containing vendor codes. The output is sent to stdout. Each line of the vendorfile is expected to have a six digit hexadecimal vendor code followed by spaces followed by the name of the manufacturer. All ethernet devices have a unique identifier which includes a vendor code specifying the manufacturer of the device. In normal operation arpwatch(8) and arpsnmp(8) use the file ethercodes.dat to report this vendor code. massagevendor is used to generate the ethercodes.dat file from text files containing these vendor codes. Locations where an ethernet vendor codes master text file can be obtained are given below. FILES
/var/lib/arpwatch - default location of the ethernet vendor list ethercodes.dat - file containing the list of ethernet vendor codes SEE ALSO
arpwatch(8), arpsnmp(8) NOTES
Sources for ethernet vendor codes seen in the wild are http://map-ne.com/Ethernet/vendor.html ftp://ftp.cavebear.com/pub/Ethernet.txt http://www.cavebear.com/CaveBear/Ethernet/vendor.html Useful for comparison or completeness are the ethernet vendor codes as assigned by the IEEE which can be found at http://standards.ieee.org/regauth/oui/oui.txt BUGS
Please send bug reports to arpwatch@ee.lbl.gov. AUTHORS
Craig Leres of the Lawrence Berkeley National Laboratory Network Research Group, University of California, Berkeley, CA. The current version is available via anonymous ftp: ftp://ftp.ee.lbl.gov/arpwatch.tar.gz This manual page was contributed by Hugo Graumann. MASSAGEVENDOR(8)
All times are GMT -4. The time now is 07:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy