in BASH when enabled you can use the up arrow keys to view your previously entered commands, and also BASH and other shells have an auto-complete featue, in bach you just hit tab and it will either complete your command or give you a list of commands. i like bash's features better than DOSKEY when i used DOS.
Set your history in your .login in your home directory.
logout and log back in (or start a new session) - type history at the prompt. Do a couple of commands and try the history command again. See if it's changed.
As far as what you wanted to do:
what i want is to
1) capture this history of commands into a file,
2) something like pressing esc and - to screen through the list of commands.
3) do the above in csh, sh.
History can be done in csh but not in sh. You won't be able to use Esc - or anything else in csh to list commands unless you change the history subsitution characters. Again, read the man page on csh and look for histchars.
I did not find "histfile" anywhere and if set, does not do a thing.
Try the savehist which can be found in the csh man page. Then you should see your .history start to grow (if you set it correctly).
I need a help in unix. is there any command in unix similar to doskey in MS Dos. It taked pain to enter the big command again and again.. the up and down arrows do not bring the previous commands on the prompt. so pls let me know if there is any command to enable the doskey kind of... (4 Replies)
I am a new UNIX user.
I use SCO Openserver 5.
I am also a longtime MS-DOS user (since 1981). There was a program with DOS called DOSKEY. It allowed you to assign a code to an F key; every time you pressed that F key you got the code on the command line. You could put in whatever command... (2 Replies)