Wednesday, May 13, 2015

unix sed command to replace & with & , " with ", < with <, > with >


sed command to replace &quot; with "

sed -ie 's/&quot;/"/g' test.xml

sed command to replace &amp; with &

sed -ie 's/&amp;/&/g' test.xml

sed command to replace &lt; with <

 sed -ie 's/&lt;/</g' test.xml

sed command to replace &gt; with >

 sed -ie 's/&gt;/>/g' test.xml

Tuesday, May 5, 2015

Unix Extract text between xml tags /anchors


Input:

<One>1</One>
<Two>2</Two>
<Three>3</Three>

Command:

sed -e 's/\(<[^<][^<]*>\)//g'  input.xml > output.txt

cat output.txt

1
2
3

Friday, May 1, 2015

Mac OS wget GUI tool utility

WgetWrapper provides an easy to use user interface for the Wget command-line tool.

Wget is designed to offer support for interactive/non-interactive downloads and is able to support several protocols such as FTP, HTTP or HTTPS.