Or for even more fun, self-modifying shell scripts:
https://stackoverflow.com/questions/3398258/edit-shell-scrip... (curiously, the accepted answer is incorrect and downvoted highly)
...and Windows batch files:
https://stackoverflow.com/questions/906586/changing-a-batch-...