Monthly Archives: July 2011


Escape asterisk * in file when cat -ing it in ksh

If you were to want to read the contents of a file in ksh, and the file just so happens to contain problematic characters like *, do this in your script: set -f prior to doing: sql=`cat $sql_file`;   More info (from http://www.computing.net/answers/unix/escaping-in-korn-shell/7016.html): echo $- ism set -f echo $- isfm echo $sample test* set +f […]


WordPress autopost

Download redstone xml rpc from source forge: http://sourceforge.net/projects/xmlrpc/files/%28New%29%20Redstone/ Set classpath to include the jar file. Enable rpc at  http://<wordpress site>/wp-admin/options-writing.php compile and run the following code: import redstone.xmlrpc.XmlRpcClient; import java.util.HashMap; public class XmlRpcPoster { public static void main( String[] args ) { // Check command-line arguments if( args.length < 3 ) { System.out.println( “Usage: java XmlRpcPoster […]