Questions tagged [html]

HyperText Markup Language (HTML) is the main markup language for displaying web pages and other information that can be displayed in a web browser.

Filter by
Sorted by
Tagged with
4
votes
4answers
880 views

Use sed to encapsulate the first word of each paragraph with <i> </i>?

So obviously I am trying italicize the first word of each paragraph in a huge document. I think its relatively easy to add the prefix but how do I delineate just the first word for the postfix instead ...
1
vote
2answers
597 views

Change the background color (html format) if a number is less than a threshold

I have the folowing file which is called test.html: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <meta name="generator" content="SQL*Plus ...
5
votes
1answer
141 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&...
0
votes
0answers
136 views

How to install HTML5/JavaScript to Netbeans?

I installed the NetBeans Connector plugin to Chromium on my MacBook. That worked perfectly. I could create new projects in HTML5/Javascript. I tried to do the same on my Linux Mint 18.3 computer. But ...
0
votes
2answers
1k views

replace file inside html tags using bash

I have a html file where I need to replace text inside the para tag with the capital letters of the same like {para}hi{\para} to {para}HI{\para} x=`cat $1 | grep -o '<p>.*</p>' | tr '[:...
1
vote
1answer
140 views

Mass convert thousands of downloaded (with wget) HTML documents to DOCX

I would like to process and convert all the files downloaded from wget in HTML format from a URL. I want to convert a complete web page to DOCX format. We are talking about 3000 HTML documents ...
1
vote
2answers
472 views

Render mixture plain text and HTML output from a command in a terminal

I am using SDcv, Collins Cobuild 5 is it's dictionary, which output html, like: # czxyl @ archlinux in ~/Dropbox [12:57:27] C:16 $ sdcv hello Found 7 items, similar to hello. --&...
0
votes
1answer
397 views

Remove <div> blocks matching a string from a huge html file

I am on Mac and I want to remove multiple <div> blocks from a html file that match a certain string. I tried to use sed for it the following way, but failed: First I escaped all the symbols in ...
1
vote
2answers
2k views

How to insert text between two set patterns with sed?

I need to insert text between two set patterns in a large set of files. I need to change every line with this form: <a href="/entry/someFile"> To this: <a href="/entry/someFile.xhtml"> ...
0
votes
1answer
50 views

Display a table from a website

I have an idea for what I want to do, but am not sure exactly what to do. I want to curl http://www.bostonglobe.com/sports/tvradio/listings then somehow display a table on this page. The table is <...
0
votes
1answer
79 views

Text Processing: How to sort list by date delimited by a string

I want to sort contents of file.txt by date. The date to sort is in the fourth table data <td></td> tag E.g. Content of file.txt: <tr><td>some_name_here</td><td>...
0
votes
0answers
739 views

Multiple html files in message body-mailx

I'm using pandas to get csv to html #!/usr/bin/python import pandas as pd import sys import json sys.stdout = open('output.html','wt') df = pd.read_csv('users.csv') print(df.to_html()) For another ...
-1
votes
3answers
154 views

Download the part of the web page [duplicate]

I would like to "parse" some list of web pages (html), the "parsing" is only about redirecting what's between <title> </title> tags to some specific files. Firstly I did for cycle with ...
0
votes
5answers
112 views

Rename a HTML file based on the content of a tag

I have a lot of html files that I want to rename according to the content of the tag h1. Any suggestion on how to do it on bash? Example of a file: <!DOCTYPE html><html lang="pt-BR">&...
1
vote
2answers
3k views

Grep only for content between tags

I have an html-type of file that somewhere includes a tag as follows: <Currentnumber>0.3.5</Currentnumber> How do I catch in a variable the value 0.3.5 and only this? I have come as far ...
0
votes
3answers
36 views

Parsing: extract a version from a html line

I would like to extract version number from this string: <a href="/url/version/tree/1.0.1alpha11" class="css-truncate"> Note that '/url/version/tree/' may change (ex: from /url/version/tree/ ...
0
votes
1answer
29 views

Do I need port 993 to get email in a WordPress site?

Do I need port 993 unfiltered to get emails from a WordPress site? For example, in WordPress I've installed a plugin called "Contact form 7" (CF7) that gives you a basic contact form. In the plugin ...
-1
votes
3answers
315 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, ...
-1
votes
1answer
787 views

sed to insert a html values in a specific line number

I was trying to insert a values in between html tags in a specific line number. Also it should ignore whitespaces at the beginning. Example :- line 15 should be replaced <john></john> ...
1
vote
1answer
670 views

generate html table of content from multiple html files

This is not specifically a Linux question. But I was wondering if I can get this done in BASH. I have multiple HTML files in a folder and I want to generate a HTML table of content. So for file1.html ...
1
vote
1answer
387 views

How can I find subdomains of splunk.com using http reponse?

I have sent http request to the "splunk.com" with usin that command curl -L splunk.com I got html codes. I want to find subdomains of that website by parsing the html codes.
2
votes
2answers
6k views

Send html format mail stored in variable using sendmail command

Below script works fine in my Linux server. ( echo "From: name@xyz.com"; echo "To: name2@xyz.com"; echo "Subject: Test Subject"; echo "Content-Type: text/html"; echo "MIME-Version: 1.0"; echo ""; ...
1
vote
1answer
1k views

Make all urls in a page absolute from the command line

I like using curl and the command line to process html pages. Relative urls are a pain. Is there some easy utility to make all relative urls absolute? Ideally this would look something like ...
3
votes
1answer
118 views

How to correctly remove a footer with hxremove?

I try to remove a footer section in multiple html files. For simplicity I started with just one file. The file contains: <footer id="footer"> ... </footer> I tried hxremove footer foo....
-1
votes
1answer
173 views

How to run hxnormalize on multiple files?

I have folder with multiple html files and I'd like to run hxnormalize on all of them and write the results back into the files. I already tried hxnormalize -e *.html and cat *.html | hxnormalize -e ...
-2
votes
2answers
236 views

Read file until match pattern [closed]

I´m reading a file and I would like to get the info until I found a match. So having the file here https://ufile.io/182kx I would like to have the json info from lastActiveTimes: until I found ,...
1
vote
1answer
105 views

wget on Centos 7 Terminal how to download only text without website style code

sudo wget -O /home/KrypticRelic/Desktop/DefaultAccess.txt phenoelit.org/dpl/dpl.html This prints out a significant amount of padding for the actual text that I'd like. Ex. <!DOCTYPE HTML PUBLIC ...
2
votes
2answers
4k views

Formatting file in HTML output

I have a little script that will format a log file with all failed logins for users on the system. I have written the script to output the data in a text file in this format (two columns with the ...
0
votes
1answer
343 views

What does this sed command do? How to change it?

I do not understand what does this command do: grep '<span id="geodata" class="geo">[-0-9.]*; [-0-9.]*</span>' -R articles/ --only-matching | sed 's@articles//@@' | sed 's@:<span id=....
0
votes
1answer
380 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 ...
-2
votes
1answer
473 views

Roundcube logo mail-in-a-box

I've installed mail-in-a-box on Ubuntu 14.04 and I can't seem to find how to change Roundcube's logo. Thank you
0
votes
1answer
391 views

Send a “TCP message” when triggered from a webpage

I have a program running on my workstation that takes an input as follows echo mycommand >/dev/tcp/127.0.0.1/1234 I would like to be able to send the "mycommand" to the specified port on the ...
7
votes
2answers
5k views

HTML email from heirloom mailx on linux

I've been trying to work through sending a html email from mailx on a linux server. Few Notes: I have to specify a smtp server so therefore I cannot use sendmail (This is not something I can change ...
6
votes
1answer
363 views

how to massage or format html in order to parse with xmstarlet?

Do I first need to run html in the wild through something like jsoup? Not to make it valid in a human sense, might turn it to gibberish, but at least so that xmlstarlet can process the file? ...
0
votes
2answers
808 views

sed to replace text url to html url

I have a bunch of URL in a text file. As Firefox seems unable to load these URL directly, I must convert them to HTML. Trying with sed doesn't work: sed -e 's/^(.*)$/<a href="\1">\1<\/a>&...
-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 ...
0
votes
1answer
2k views

df -h command output in HTML format with specific columns

I am trying to write a shell script which sends the output of df -h in mail with the help of HTML code embedded in the script. The issue is this is printing all six columns. I want only specific ...
-1
votes
1answer
396 views

How to add multiple table rows in awk

Basically I am trying to print a table with 4 fields per row and the 5th field should go to the second row all the way to 8th field. awk 'BEGIN{ FS=" " print "<HTML><BR>&...
0
votes
1answer
2k views

Bash script to extract values from HTML

I am trying to extract counter values from a HA7NET 1wire device server, but I am not so used with sed or awk or bash scripts so I am running in to problems. This script gives me an array with the ...
2
votes
2answers
222 views

Best way to insert blocks of HTML in bash

I have been working on a script that collects data about servers and formats them into a nice html email report. I have been using sed to replace values in a html template so far and that has been ...
0
votes
1answer
771 views

Get the redirect URL with cURL

I am trying to get the source HTML code from the latest posts but... This URL: http://www.sportsbookreview.com/forum/search.php?do=getnew Redirect me to: http://www.sportsbookreview.com/forum/...
1
vote
2answers
154 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</...
1
vote
1answer
872 views

Edit HTML files from the command line

I'm looking for a way to edit HTML files from the command line similar to sed or awk, but using path expressions similar to jq or pup. In particular, newlines, white space and other formatting details ...
2
votes
5answers
1k views

Need to extract a number from HTML

Given this: <p>Currencies fluctuate every day. The rate shown is effective for transactions submitted to Visa on <strong>February 5, 2017</strong>, with a bank foreign transaction ...
2
votes
2answers
246 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
5k 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
1answer
237 views

How to downloaded HTML file with obfuscated text

I use Firefox and I don't have any issues viewing and reading English text on the loaded websites. If I click Save in Firefox and save the web page in question as a text file I can read everything in ...
0
votes
2answers
63 views

Traverse & Convert HTML based documentation directory to either TEXT or PDF

Documentation for a standard system package is contained in: /usr/share/doc/rsyslog-5.8.10 (distros: RHEL 6/Centos 6) however it is all *.html. I'd like to traverse all the files in the proper ...
1
vote
0answers
577 views

How to generate a nmap HTML report with python?

Given an .xml output file from a nmap scan, how would you suggest to generate an html report from this file? nmap proposes the following utility with shell (reference): xsltproc xsltproc <nmap-...
3
votes
1answer
372 views

Using wget or another command, how to download now but convert links later?

The useful option wget --convert-links or wget -k makes "links in downloaded HTML or CSS point to local files." It makes two passes: Pass 1: download files. Pass 2: convert links. I want to do pass ...