DISCLAIMER: THIS CODE IS FOR EDUCATIONAL PURPOSES ONLY. USE AT YOUR OWN RISKS.
This is basically how a shell works.
-
make
-
(optional) Append "/path/to/dashell" to /etc/shells, to make it a valid shell:
sudo bash -c 'echo "/path/to/dashell" >> /etc/shells'
-
(optional) Change "username"'s shell. "username" should have execute permission for the shell:
chsh --shell /path/to/dashell username
./dashell
dashell> ls -al
dashell> ./launchme 1 2 3
....
dashell> exit