Re: bash trick - prefixing a command?

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

 



At 8:31 PM -0700 10/25/05, jdow wrote:
>From: "Jeff Vian" <jvian10@xxxxxxxxxxx>
 ...
>> something like
>>
>> while 1
>> do
>>  readline <read the command input line>
>>  <put the values read into VARS here>
>>  myprog $VARS <call your program while passing the values read>
>>  <reset VARS here>
>> done
>
>That might work, until the user hits ^C. So that would have to be trapped,
>as you say. And once the user figures out $VARS is magic the rest is
>history. This could prove the concept and give yourself an "adventure
>shell" experience. But if it's supposed to be a security tool I would
>write my own very limited shell.

As the command will executed by myprog and therefore in a different
process, changes made to the environment (and the $VARS in it) will not
have any affect on the pseudoshell loop or on what is passed to myprog.
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson@xxxxxxxxxxxxxxxxx>
      '                              <http://www.georgeanelson.com/>


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

  Powered by Linux