There may be. Try the Icon Programming language at
www.cs.arizona.edu/icon (Icon is C meets Perl meets ProLog meets Beta).
The reason I think it would work with Icon is that you can modify the way the program is loaded.
With a pure binary this might get rather involved, since the first part of the program would have to consist of a key prompter, a loader and dectrypter, and the application.
It is an interesting project, but you might want to be quit proficient before attempting it.
Also, what do you want to achieve?
For copy protection there already exists loads of libraries ... but for putting something together quickly and running it, I don't know.
For a shell script, you just feed the script to decrypt before executing ...
Atle