in all files in a directory (php, html, etc), I wanted to change table's width, only if it was in a certain range
using ubuntu hardy heron, this is what i pulled out:
find . -maxdepth 1 -type f | xargs -I f egrep '<table .*(?>)?[^>]*>' f --color -H | grep width | grep -v % | sed -r "s/width\s*=\s*((\"|'))((59|6|7)[0123456789][0123456789])\1/width=\"100%\"/g" | sed -r "s/^([^:]*):.*/\1/g" | xargs -I f sed -i -r "s/width\s*=\s*((\"|'))((59|6|7)[0123456789][0123456789])\1/width=\"100%\"/g" f
somebody ?
Python, IaC, algo trading, programming, server administration, Linux, PHP, CakePHP, PostgreSQL, MySQL, Joomla ...
Wednesday, April 7, 2010
change html width attribute in table of a files using find grep and sed
Subscribe to:
Post Comments (Atom)
cancel script completely on ctrl-c
I found this question interesting: basically how to cancel completely a script and all child processes : You do this by creating a subro...
-
I've been using WinScp and a script to compress files at maximum compressiĆ³n, name the file as name_YYMMDD-HHMM.rar, and send them to a...
-
tomado de: http://el-directorio.org/ErroresComunesPhpmyadmin ARREGLAR ERROR 1045 (28000): Access denied for user 'root'@'localho...
-
Styling Excel cells with mso-number-format mso-number-format:"0" NO Decimals mso-number-format:&quo...
No comments:
Post a Comment