Shell is very powerful and a great tool but when you have an ATmega168 with 14k usable flash and 1K RAM you are limited in what you can do
Having the arduino put together potentially long complex command lines and send them back to the computer is going to require some fairly complex C code and potentially a very big and complex command table
I think it would be much simpler and much less error prone to send a single ASCII character ( alpha or digit ) to indicate which button was pressed and then your higher level script, be it Perl, Python, Shell, PHP or what have you can take that input and execute the appropriate command on the Linux PC itself
Besides it is a lot easier to work with the command mapping on the Linux PC itself, rather than having to reprogram the arduino every single time you want to change the command
Would you prefer vi my_script.$ext or gedit my_script.$ext or arduino, edit, compile, upload, edit, compile, upload, edit, compile, upload, edit, compile, upload, edit, compile, upload... ?
Having been a Linux person for a long time I can easily imagine a situation where one of my command lines could be much bigger than 1024 characters which would overflow the RAM on the ATmega168
My advice, keep it simple on the Arduino side and move all the complexity to the Host PC side
Perl, Python and PHP are cross platform so your script would work on any host system ( Linux, Unix, BSD, MacOS X, win*****, etc ) with some changes to the commands of course