Re: Preventing Bang out of Perform
Posted in 1995
hoinj@cc.tacom.army.mil wrote: : I wrote a Unix shell script which serves as a menu system for users : to run Informix reports, forms, etc. The script is invoked at login via : .profile, and the TRAP command prevents users from breaking out of the : menu with the delete key. I don't want anyone to remove or overwrite : any of my files. However, they still could bang out an Informix form : with a ! and be on their merry way. : Is there something I can do to prevent the bang in Perform? Sure, change the SHELL environment variable before executing the Perform screen. For example you might do it like this: ORG_SHELL=${SHELL} SHELL=/dev/null export SHELL sperform my_form SHELL=${ORG_SHELL} export SHELL NOTE: This doesn't remove the ! from Perform per se, but it does prevent it from doing anything. In other words, people can still type !, but now it just won't do anything for them. This same technique can be used for a number of different Unix programs that allow shell escapes such as "more" and "pg". It doesn't work for all though, such as "mailx". -- +--------------------+----------------------------+--------------------------+ | Michael Faurot | mfaurot@phzzzt.atww.org | I don't like | | ------- ------ | | lima beans!! | +--------------------+----------------------------+--------------------------+