Re: bash trick - prefixing a command?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Terry Polzin 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"

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


No, I don't think an alias would work - the argument isn't known ahead of time, so you can't define an alias.


- Mike



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux