sed -e 's/^/" /g' -e 's/$/ ",/' myfile.txt
Showing posts with label sed. Show all posts
Showing posts with label sed. Show all posts
Wednesday, May 11, 2011
SED: enclose each line in quotes and comma at end of line
Monday, December 24, 2007
SED: Converting carat symbols to HTML special characters
Goal: Show HTML and PHP code, rather than have it interpreted by the web browser.
Using a GNU or Unix command line, myWebpage.html is a regular fully working HTML web page, here is the command: sed -e 's/\</\</g' -e 's/\>/\>/g' myWebpage.html > newWebpage.html| Bash Program To Convert Tags to Special Characters |
#!/usr/bin/env bash
echo "lancemiller777@gmail.com"
echo "Argument 1 is file with html tags"
echo "sed -e 's/\</\</g' -e 's/\>/\>/g' \${1}"
sed -e 's/\</\</g' -e 's/\>/\>/g' ${1}
|
Subscribe to:
Posts (Atom)