Around the time powershell came out I got into the (bad) habit of writing super-concise bash scripts that write bash scripts, for instance:
ls *.txt | awk '{print "mv" $1 "/somewhere/"}' | bash
You're really not supposed to do this because if your character escaping is less than perfect somebody can corrupt the bash script that your script writes (like SQL injection) but it is so much fun...