05-02-2001 08:53 PM
Can someone advice whether can this function be set in C-shell. I have a customer who is using C-shell as their default shell login. And they want to use the feature whereby by pressing a button, you will be able to see the command that key previously, something like when in K-shell, (example you type command swlist, bdf, ioscan -kfnC disk) and by pressing Ecs Key + K on the keyboard will display the previuos command being enter by user. But, can this be done on C-shell. Please help and advice.
05-02-2001 10:14 PM
You can access the history in csh with the command "history". Of course it is also possible to access the commands in the historylist. E.g.
!! will repeat the las command
!23 will repeat the command numer 23 in the history
!?du will repeat the last command beginning with du .... and so on.
There are also substitiutions and stringreplacements possible. The one i remember is
^this^that This will recall the last command and replace the string "this" with the string "that"
Hope this helps. Stefan
05-03-2001 01:24 AM
csh does not support command line editing like Korn shell etc.
As Stefan mentioned you can use "!" to recall commands from your history.
If you really want command line editing, you could switch to "tcsh". But I believe that there are also some utilities available: try groups.google.com; you should find some references.
05-04-2001 08:38 AM
After the person logs on, all they have to type is 'ksh', then they will be in K shell and all commands can be recovered from that point on as the command line is now in VI mode.