All Questions

Tagged with
Filter by
Sorted by
Tagged with
-1
votes
2answers
49 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. ...
0
votes
3answers
46 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/...
1
vote
1answer
340 views

How to get frame source using wget?

I am trying to get html data from servicenow website. It's using frames and I would like to extract the frame source using wget. I am unable to find the option/flags to do this job. I am only able to ...
0
votes
0answers
115 views

Running a script as a webpage

So I've got basically the most rudimentary understanding of how webpages work, I installed httpd, apache, php and some other stuff, and now if I put files in /var/www/html people can access them by ...
1
vote
1answer
968 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, ...
5
votes
1answer
109 views

The right tool to reverse the sorting order of thousands of elements in HTML file [closed]

I have a HTML file containing thousands of <div class='date'></div><ul>...</ul> blocks of code like below: <!DOCTYPE html> <html> <head> </head&...
-1
votes
3answers
181 views

How to get URL's from a JSON page where the user searches a word and then appears all the websites with that word?

I am trying to use a script in bash shell that returns the present urls on a certain webpage... What I have is a script that returns all URLs but you need to put in the code the link that you want, ...
0
votes
1answer
261 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 ...
-1
votes
3answers
1k views

How to cut part of a “curl” answer

I have been having a look at this for a while but I haven't found any answer yet. I've got a curl command to send a HTTP POST request to a server, then I have created a script called "tmg.sh" which ...
1
vote
2answers
126 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</...
2
votes
2answers
222 views

Sort css files by the color property

I would like to build script that sort the CSS file by colors. For example: .actions_menu_forgot_password_link:hover {color: #deca9b;} .login_popup_forgot_password_link {color: #ddeffb;} ....
0
votes
1answer
4k 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=...
1
vote
2answers
654 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 "-"...
1
vote
3answers
92 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/...
4
votes
2answers
811 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 ...
0
votes
1answer
116 views

i want to remove tag in xml when it is repeating multiple times

I want to comment particular tag with particular value from xml when it is repeating multiple times example: <t1> <t2>hi<t2/> <t1/> <t1> <t2>hello<t2/> <...
4
votes
4answers
1k 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 ...
2
votes
3answers
1k views

Shellscript to remove particular tags in HTML file

Can anyone please guide me with writing Shell Script command for following scenario. I have an html file with all tags in a single line like this, <html><head></head><body>&...
1
vote
2answers
1k views

Script to remove certain span elements from an HTML file

I want to write a script that completely removes every instance of a particular span class from a given HTML file. For example, if my undesired span class is "foo" then running my script on the file ...
1
vote
1answer
780 views

How can I replace the <title> element in many HTML files?

My directory ~/foo contains many HTML files. Each one has a different unwanted title element. That is, each file contains the code <title>something unwanted</title> Many of these files ...
0
votes
2answers
784 views

Bash script to edit lots of html documents

I have a directory with many HTML documents. Most of them contain the codeblock .org-link { /* org-link */ color: #b58900; font-weight: bold; text-decoration: ...
0
votes
2answers
846 views

Search the value from a dynamic file and pass to a variable in HTML [closed]

I have the following file below with the format and I want to pass the value to HTML BE64533-A0E1-4F98-A91F-02C1D0 column=ABC_Received:ABC_Structure_Type, timestamp=1439978656596, **value=ASCII** ...
1
vote
1answer
1k views

Shell script equivalent to PHP $_POST

For example and learning purposes, I have a webpage that uses POST method to submit a text field. I have a server running script (bash) that I want to display what the "Query_string" is. I'm not ...
1
vote
1answer
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 ...
22
votes
7answers
65k 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 ...