Category: bash

  • casperjs output to html

    Documenting what I had to do. Used XSLT from here: nosetest xslt Problems and Fixes: Firefox was inserting “transformiix” as the root element, this caused the DOCTYPE to be spit out. I fixed by adding: doctype-public=”-//W3C//DTD HTML 4.0//EN”/ to

  • Backgrounded PHP jobs in ‘STOPPED’ state

    This could be specific to the PHP package from Ubuntu. Please consider the following a disclaimer. $ php -v PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch (cli) (built: May 2 2011 23:00:17) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans $ cat /etc/lsb-release…

  • GNU sed, replace search string with contents of a file

    Say, I want to replace the text “replace me” in all the .txt files in the current directory with the contents of modified.js file find . -name “*.txt” -print0 | xargs -0 sed -i -e ‘s/replace me/cat modified.js/e’ Notice the ‘/e’ at the end and that seems to do the trick.