Implementing ! functionality for Korn shell

This is a discussion on Implementing ! functionality for Korn shell within the Tech Board forums, part of the Community Boards category; Hello,
I'm trying to implement the ! operator from the Bourne shell for Korn shell. The ! operator allows you ...

Implementing ! functionality for Korn shell

Hello,
I'm trying to implement the ! operator from the Bourne shell for Korn shell. The ! operator allows you to execute the last command entered beginning with the word after !. Here's what I have so far. Note: I know that fc -s would allow me to implement the functionality of !, but I did not know about fc before writing this. I figured I might as well go through with this.