Hi,
I'm new to scripting. I understand the concepts and syntax of some commands but have difficulty with others and combining actions to achieve what I'm trying to do so hope someone on here can help.
A long while back I inherited a website with 1000's of pages most of which were created by a... (2 Replies)
I have to write a sed script which removes http and https from a URL. So if
a URL is https://www.example.com or Example Web Page, script should return me Example Web Page
i tried echo $url | sed 's|^http://||g'. It doesn't work. Please help (4 Replies)
for example, I have an html file, contain
<a href="http://awebsite" id="awebsite" class="first">website</a>and sometime a line contains more then one link, for example
<a href="http://awebsite" id="awebsite" class="first">website</a><a href="http://bwebsite" id="bwebsite"... (36 Replies)
Here is what I have so far:
find . -name "*php*" -or -name "*htm*" | xargs grep -i iframe | awk -F'"' '/<iframe*/{gsub(/.\*iframe>/,"\"");print $2}'
Here is an example content of a PHP or HTM(HTML) file:
<iframe src="http://ADDRESS_1/?click=5BBB08\" width=1 height=1... (18 Replies)
I've been attempting to use curl and sed to allow for downloading a file from a dynamically generated URL. I've been able to retrieve and save the HTML of the page that does the dynamic generation of the download URL using curl but I'm very new to sed and I seem to be stuck at this part.
HTML: ... (1 Reply)
Hi All ,
Here is what I want to do:
Given a line:
98.70.217.222 - - "GET /liveupdate-aka.symantec.com/1340071490jtun_nav2k8enn09m25.m25?h=abcdefgh HTTP/1.1" 200 159229484 "-" "hBU1OhDsPXknMepDBJNScBj4BQcmUz5TwAAAAA" "-"
1. Get the URL component: ... (2 Replies)
Hello,
I want extract multi values from multi url source to a csv text. Thank you very much for help.
my curl code : curl "http://www.web.com/cities//city.html
Source code:
div class="clear"></div>
<table class="listing-details">
<tr>
... (1 Reply)
Original Line
{background-image:url('http://www.myoldhost.com/images/scds/tsp3.png');}
Expected
{background-image:url('http://www.mynewhost.com/nndn/hddh/ccdcd.png');}
I am using following syntax
STATIC_HOST_TEMP="http://myhost.com/temp/xyx.png"
$sed -e... (1 Reply)
Hi I was hoping some one would know if it is possible to url encode a string using sed?
My problem is I have extracted some key value pairs from a text file with sed, and will be inserting these pairs as source variables into a curl script to automatically download some xml from our server.
My... (5 Replies)
Discussion started by: Paul Walker
5 Replies
LEARN ABOUT DEBIAN
plan9-fmt
FMT(1) General Commands Manual FMT(1)NAME
fmt, htmlfmt - simple text formatters
SYNOPSIS
fmt [ option ... ] [ file ... ]
htmlfmt [ -a ] [ -c charset ] [ -u url ] [ file ... ]
DESCRIPTION
Fmt copies the given files (standard input by default) to its standard output, filling and indenting lines. The options are
-l n Output line length is n, including indent (default 70).
-w n A synonym for -l.
-i n Indent n spaces (default 0).
-j Do not join short lines: only fold long lines.
Empty lines and initial white space in input lines are preserved. Empty lines are inserted between input files.
Fmt is idempotent: it leaves already formatted text unchanged.
Htmlfmt performs a similar service, but accepts as input text formatted with HTML tags. It accepts fmt's -l and -w flags and also:
-a Normally htmlfmt suppresses the contents of form fields and anchors (URLs and image files); this flag causes it to print them, in
square brackets.
-c charset
change the default character set from iso-8859-1 to charset. This is the character set assumed if there isn't one specified by the
html itself in a <meta> directive.
-u url Use url as the base URL for the document when displaying anchors; sets -a.
SOURCE
/src/cmd/fmt.c
/src/cmd/htmlfmt
BUGS
Htmlfmt makes no attempt to render the two-dimensional geometry of tables; it just treats the table entries as plain, to-be-formatted text.
FMT(1)