Skip to main content

All Questions

-2 votes
4 answers
3k views

Simple way to get extract data from HTML

After I retrieved a web page with curl -X POST http://example.com/data/123 I got this response: <td><a href="http://help.example.com " target="_blank">help.example.com</a></td&...
Aziz's user avatar
  • 1
-1 votes
2 answers
1k views

Return the next 50 characters after a string is found in a file

I'm pretty terrible with regex and searching for patterns, so I don't really know where to start. I need to find <td id="latest_button"> in test.txt and return the next 50 characters after it. ...
Dragon8oy's user avatar
0 votes
3 answers
130 views

Looking for bash script which can insert input from 2 files

I have 2 files with different data. How can I put data in those files and print it? I was trying for loop, but it is only good for 1 variable. FileA https://xyx.com/test-posts/ https://www.abc.com/...
Pawan's user avatar
  • 23
2 votes
1 answer
5k views

Awk select columns between html table data

I'm trying to extract data between <td></td> tags, but if i use something like awk -F"<td>" {' $1 ":" $2 '} it will output the remaining html data after column 1 and column 2, how ...
guest's user avatar
  • 21
0 votes
1 answer
1k views

Extracting values from a text file having | pipe as a delimiter in text file using awk command and Replacing new lines with <br> tag using sed?

I have a text file in which I have 3 sections values separated by pipe. My text file: Saibal,Navnath,Taral,Sagar,Ankit,Prasham,Manika,Arvind,Gaurav,Abhijeet,Rohit,Madhu,Ganesh,Zahoor| LSCRM:Abhijeet ...
Abhijeet Anand's user avatar
1 vote
2 answers
324 views

text processing : extract parts of a file and write them into a single line

I have several files formatted like this: ... <title> Field1 : DATA_FIELD_1</title> ... <i class="blablabla"></i> <b>Field2 : </b> <span>DATA_FIELD_2</...
user223423's user avatar
0 votes
1 answer
9k views

Create to HTML from an output of bash script

I want to create a script to convert the output of my script to an HTML format. Below is the sample output of my script: [root@test tmp]# cat StoreOnceStatus.txt spawn ssh -o StrictHostKeyChecking=...
Wilfredo Tario's user avatar
1 vote
2 answers
1k views

Rename all spaces in image file names inside html php files

Inside different htm.gz, html.gz and php.gz web files I have images and the ones in .jpg format have name with space instead of "-", but in /images/ directory where all images are located they have "-"...
becoolflyer's user avatar
1 vote
3 answers
156 views

Joining two parts together to make a single script

I'm trying to create a script to do the following: extract the magnet link from a lynx bookmark and then use it as part of a curl command. like this: curl http://my_ip:my_port_number/startdownload/...
Phil's user avatar
  • 31
4 votes
2 answers
1k views

Bash script to extract some information from Ebay HTML pages

I would like to filter the output of a search on ebay which I've exported to a text file. There are a number of results in the search but I've included just one example at the bottom of this post as ...
neilH's user avatar
  • 433
4 votes
4 answers
3k views

Extracting strings from between special characters

I have a large text file created from combining lots of html files. cat *.html > all_html_files.txt Inside the text file are specfic strings that I want to extract to another text file. For ...
speld_rwong's user avatar
1 vote
1 answer
2k views

grep to extract a substring from a huge string

I am extracting certain information from a website using curl command. I need to extract a certain subsection of the string using grep command. For example, using curl command I am getting the HTML ...
Ramesh's user avatar
  • 40.3k
27 votes
7 answers
94k views

Text between two tags

I want to retrieve whatever is between these two tags – <tr> </tr> – from an html doc. Now I don't have any specific html requirements that would warrant for an html parser. I just plain ...
TechJack's user avatar
  • 373