![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Previous command | new2ss | HP-UX | 5 | 02-14-2008 06:06 AM |
| Previous Command | vskr72 | UNIX for Dummies Questions & Answers | 2 | 04-20-2007 11:03 AM |
| Previous Command | vskr72 | Shell Programming and Scripting | 1 | 04-19-2007 07:04 PM |
| Previous Command | vskr72 | UNIX for Advanced & Expert Users | 0 | 04-19-2007 06:51 PM |
| Seeing previous command | JackieChan | UNIX for Dummies Questions & Answers | 4 | 06-02-2006 09:35 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
getting the previous command
Hello all
I'm on SunOS5.9 and I'm trying to make the arrow keys work as in DOS ..get the previous command , etc .. I searched this site and got an answer. I pasted the following code to my .kshrc file in my home directory...It still does not seem to work ...Am I missing anything here ? I'm using Ksh .... added the following lines to the bottom of your .kshrc file in my $HOME directory: set -o emacs alias __A=$(print '\0020') # ^P = up = previous command alias __B=$(print '\0016') # ^N = down = next command alias __C=$(print '\0006') # ^F = right = forward a character alias __D=$(print '\0002') # ^B = left = back a character alias __H=$(print '\0001') # ^A = home = beginning of line Thanks |
|
||||
|
The arrow keys will work like DOS in bash.
In ksh you can put "set -o vi" in your profile or run it for that session, and you can ESCAPE-K back thru your commands. I am not sure how to do what you want. |
|
||||
|
getting the previous command
Thanks to both of you for your inputs ...
Reborg I implemented your solution ..worked like a charm..One question though..one of my accounts has a default shell of /bin/sh (Bourne Shell).I pasted the aliases in both .profile as well as .kshrc but it does NOT seem to work...Please advise ... OS : SunOS5.9 Shell : /bin/sh Thanks |
|
||||
|
Getting the previous command
Thanks reborg ...In that case, I'll request my administrator to change my shell to ksh ...
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|