Doskey


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Doskey
# 8  
Old 02-26-2003
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.
# 9  
Old 02-27-2003
my shell is csh
i did a set and got the below

histfile /home/adm/.history
history 100

i did a ls -ltr /home/adm/.history but it was empty.

what else do i need to set?
yls177
# 10  
Old 02-27-2003
Read the man page for csh - search for savehist.

Set your history in your .login in your home directory.

set history=200

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:
Quote:
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).
# 11  
Old 02-27-2003
Just an FYI to above, bash can do either history type, as can some vrsions of ksh.

bash default is the same as entering "set -o emacs".
You can get the vi editing mode on bash by entering "set -o vi".
# 12  
Old 02-27-2003
Lightbulb The most flexible of all

The most flexible shell of all wrt user input/command recall and much more besides is zsh.
# 13  
Old 02-27-2003
i did a man csh, but did not read/find any savehist at all.
please advise.

the set history=200 in .login works.. but now i hoped to get it to write
to a file.
yls177
# 14  
Old 02-28-2003
set history=200
set histfile=$HOME/.history
set savehist=200 merge


put the above in .login and it will work!

cheers....


okay, will try to achieve the same for sh...
yls177
 
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Command similar to doskey

Hello all, 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)
Discussion started by: halel
4 Replies

2. UNIX for Dummies Questions & Answers

DOSKEY

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)
Discussion started by: jimwelch4
2 Replies
Login or Register to Ask a Question