bash trick - prefixing a command?

Terry Polzin fox3ec208 at wideopenwest.com
Tue Oct 25 17:04:46 UTC 2005


On Tuesday 25 October 2005 01:00 pm, Dr. Michael J. Chudobiak wrote:
> I want to do some shell trickery so that when a user enters a command like:
>
> ls -l
>
> the command is forwarded to another program as an argument. That is,
> what actually gets executed is:
>
> myprog "ls -l"
>
> Is there a way to do that? Basically I want to use bash as transparent
> front end for another program (actually a command parser for some custom
> hardware), while keeping the handy editing and history abilities of bash.
>
> Any suggestions (other than writing my own stripped down and customized
> shell, which I know is an option)?
I think what yo want to do would be a command alias.  Generally, these are  
setup in either the /etc/profile or in the individual users .bash_profile 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20051025/5da79ab3/attachment-0001.sig>


More information about the fedora-list mailing list