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
1
vote
1answer
3k views

Extract text from source code website

I need extract text with a bash script from a website in HTML, I used this solution but doesn't work fine for me, because I must edit and format the output text. I need the text between the tag: &...
1
vote
1answer
1k views

Sed: search and replace a patten with special characters which has a arbitrary string in between

I have a load of nfo files which I want to make some global substitutions for some values within each file e.g. a.nfo has the value <set>Tonight&apos;s Menu ( June 2012 )</set> ...
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 ...
1
vote
1answer
104 views

Web page not able to find CGI program file

I was trying to invoke a CGI program via an html file. But got stuck for the error "file not found". I am trying the same program as in the following site: http://highered.mcgraw-hill.com/sites/dl/...
1
vote
1answer
36 views

markdown table to html table converter in CentOS

I am looking for a way to convert a markdown table into a html table using the shell. I know this tool: https://linux.die.net/man/1/markdown This does a great job and is exactly what I am looking for, ...
1
vote
1answer
45 views

Wanted: GUI interface to show status of services on many servers

We have 763 Red Hat 7.2 Linux machines with systemd, systemctl and the presto service: systemctl status presto.service ● presto.service - Perforce Server Loaded: loaded (/etc/systemd/system/...
1
vote
4answers
297 views

sed find and replace html tag

I need find and replace in a md file (plain text) <span class="symbol">&#58771;</span> with this: [&#58771;]{custom-style="symbol"} I tried many times, f.e. sed -i -e 's/\(&...
1
vote
2answers
404 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. --&...
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"> ...
1
vote
1answer
357 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.
1
vote
1answer
101 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 ...
1
vote
1answer
78 views

space in time column causing problem in formatting html file in script

I am in the process of creating an automated mail where in the body of the mail data should be displayed in a table format. I did some extent generate a table format in the body of mail, but I am ...
1
vote
1answer
63 views

HTML5 Parser/wrapper

It may be the very elementary question. But I would like to know, is there any HTML5 parser/application available which will allow me to play/execute HTML file without the need of any browser. I am ...
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
95 views

Embedding a cmap in moinmoin

I'd like to embed a cmap in a moinmoin wiki page. I generated the cmap using dia. I then copy pasted the generated html code, modified it to point to the png image I attached to the wiki. However ...
1
vote
1answer
309 views

How to replace the original value of variable in HTML tag

I am facing some problems in replacing the value of a variable in a html tag in a unix box. Here are the details. Please help me in finding a solution. #!/bin/ksh count=5 line="<td>$count</...
1
vote
0answers
28 views

bash script - Add string to cell in html table IF title of row is already in

I have a bash script that checks on the status of certain processes and aspects of multiple servers and i am pushing the results to an html file to display in an email. Some servers have as many as 6 ...
1
vote
1answer
45 views

MIME type text/html: how & where defined?

I've asked a related question on AskUbuntu (How to open *.htm differently than *.html?) with no interest yet, so I'm addressing the same issue with a more fundamental question. I cannot find how and ...
1
vote
0answers
20 views

How to make redirect go to alternate web page if Shift key is being held?

I am trying to make a secret alternate redirect on a web page that redirects to an alternate page when holding down the key, otherwise it redirects to the regular redirect page. Example/Clarification:...
1
vote
1answer
73 views

Placing the last line first in each html <ul> with sed

I try to place the line "name: *****" just after the corresponding (innermost containing) "ul" each time an "ul" appears, so that it looks like this: Before: <ul> <ul> <li ...
1
vote
2answers
484 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 ...
1
vote
1answer
126 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
1answer
588 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
2answers
141 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
792 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 ...
1
vote
0answers
563 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-...
1
vote
0answers
34 views

Firefox always opens behind calling program

I am opening a local html file with Firefox on RHEL 6.3 with Gnome 2.28.2 and Metacity 2.28.0. Unfortunately, regardless of how I open it (terminal or java) Firefox always opens in the background, ...
1
vote
1answer
53 views

Match a number with fixed digits while scraping web content

I'm trying to parse a source web pages, trying to find all href similar to this: href='http://example.org/index.php?showtopic=509480 where the number after showtopic= is random (and with 6 fixed ...
1
vote
2answers
678 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
1answer
449 views

Adding/removing some tabs and line breaks in an HTML code using sed

I want to refine an HTML code using sed, as an extra refinement procedure after refining it using HTML Tidy, as HTML Tidy doesn’t look flexible enough for some requirements. I used this command to ...
1
vote
1answer
2k views

BASH Script for logging in to Website

I've tried many solutions provided here in other forums and websites. Like this: #curl -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" \ #--cookie cjar --cookie-jar cjar \ #--data "username=name" ...
1
vote
1answer
164 views

How to export Google Alerts citations?

I have several months of Google Alerts in my email and I would like to share them somewhere on the web (for instance on a MediaWiki wiki). Is there an easy way to export them? The alerts contain HTML ...
1
vote
1answer
847 views

Text extraction from HTML page

I am using xidel command to extract text from HTML page. Here is my code xidel http://www.ip-adress.com/ip_tracer/8.8.8.8 --extract "<table> <tbody> <tr> <td> <...
1
vote
0answers
572 views

extracting text from HTML

I have this page. I want to extract text from html page, particularly table heading (th) and table data (td). For example: Country: United States (US),State: California where th = Country and td = ...
1
vote
2answers
195 views

Ubuntu SELinux - why different types for files var_t vs file_t

I have Ubuntu 14.04 running on two vm's. I have have permissive SELinux enabled on both. On system1, all of my files + linked directories in /var/www/html are marked as var_t and the symbolic linked ...
1
vote
0answers
207 views

Can htmldoc create multi-level pdf bookmarks?

I downloaded an online html book (http://www.cim.mcgill.ca/~franco/OpSys-304-427/lecture-notes/lecture-notes.html), by the following command wget -r -np -nH --cut-dirs=3 -p -k http://www.cim.mcgill....
1
vote
1answer
790 views

Extract Values from HTML via HTML parser [duplicate]

I initially asked about a way to use grep/awk directly from an HTML file. I got some feedback but I see that people did not have the whole HTML and so the solutions suggested failed. Some have ...
0
votes
2answers
1k views

How can I grep for broken HTML tags?

I want to grep through all my HTML files and see if I have any bad tags there, example <br> , <hr> and so on, that is the I want to see what tags are not closed in the HTML file. for ...
0
votes
3answers
3k views

How can I delete html tags from a file using sed?

I have a file that is mixed with both normal text I need and html-tags. I know that with REGEX it is possible to recognize html tags and with sed one can swap those for an empty string, but I do not ...
0
votes
5answers
93 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">&...
0
votes
2answers
96 views

How to specify the file type in a hard link [closed]

Does anyone know how to specify the file type of a hard link? Is this even possible? For example, I want to link to an HTML file (with content type text/html) in my website directory, so I used ln ...
0
votes
1answer
61 views

Finding all kinds of extensions referenced in a html file

Here is my problem statement : There is a folder with many html and text files. I need to recursively go through each one of them and find all kinds of file extensions referenced in these html/text ...
0
votes
3answers
48 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/...
0
votes
2answers
497 views

How to remove newline character between two strings <font>\n</font> in unix?

I want to remove the newline between two html tags which exists as follows: <font> </font> I want to remove the newline character such that it becomes: <font></font> Also, ...
0
votes
2answers
888 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** ...
0
votes
1answer
721 views

globbing, sed, or awk html files

I wanted to create a script that I could check .xhtml files for images and add alt tags if needed. While searching I found regular expressions and did man on glob but I'm unsure on where or what to ...
0
votes
2answers
442 views

Using bash to replace html character entities in the xml file

I have a string like this in xml file: &lt;h3&gt;Styled here with: &lt;a href="$url('Product-Show','pid','107723102')$"&gt;FRS blo&lt;/a&gt;, &lt;a href="$url('Product-...
0
votes
2answers
629 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>&...
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=...
0
votes
2answers
712 views

How to grab the head section of a website using the curl and grep command?

I'm taking my Linux+ midterm and I'm stuck on a question where I'm supposed to copy the head section including the tags and output it to a file. My midterm is due on the 5th so it would really help if ...