Category Archives : scripting

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 echo $- ism set -f echo $- isfm echo $sample test* set +f […]