getting the previous command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers getting the previous command
Prev   Next
# 1  
Old 08-16-2005
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
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Retrieving previous command in a script

i know from the command line, the symbol $_ is used to get the last command that was run. however, id like to replicate this within a script. meaning, how do i do something like this: #!/bin/sh ps -ef | egrep talling StoreThisLastCommandA=$_ awk '/error/ {print $3}' /tmp/test... (5 Replies)
Discussion started by: SkySmart
5 Replies

2. UNIX for Dummies Questions & Answers

date command - getting previous month

Hi, On any given day, I want to capture the month that has gone by - said otherwise, how do I capture last month? expr date '+%m' - 1 Above expression is giving error. Please advise thanks ---------- Post updated at 09:28 AM ---------- Previous update was at 09:11 AM... (1 Reply)
Discussion started by: ab_2010
1 Replies

3. Shell Programming and Scripting

Referring from the print of the previous command

Hi, I am a newbie in SHell Programming. I want to ask something about referring the result of the previous command in Shell-Prog. For example : bnm@dsds~> ifconfig eth0 Link encap:Ethernet HWaddr 00:0B:CD:85:A5:8A inet addr:192.168.0.2 Bcast:192.168.0.225 Mask... (2 Replies)
Discussion started by: bobb
2 Replies

4. UNIX for Dummies Questions & Answers

Repeat previous unix command

Hi all, Is there a way to bring back the previous unix command without retyping? I tried the "arror up" key, and it seems not working (sun solaris). What is the correct way? Thanks! (4 Replies)
Discussion started by: syang68
4 Replies

5. HP-UX

Previous command

Hi, i would like to retrieve (only retrieve, not execute) a previous command which i executed on the command prompt. I tried the 'up arrow' key, but its not working. Instead,it showed me some funny characters. I searched around and i found the way to do it was using the way below. Several... (5 Replies)
Discussion started by: new2ss
5 Replies

6. UNIX for Dummies Questions & Answers

previous,next command in unix

Hi , after pressing down arrow,up arrow I want to find previous,next command in unix wat can i do for tat plz tell me I am accesing unix server thru telnet. my shell prompt ksh (4 Replies)
Discussion started by: arulkumar
4 Replies

7. UNIX for Dummies Questions & Answers

Previous Command

We have a Solaris Server and I am acessing it through telnet to run various commands for my data validation like GREP, SED, AWK etc. My requirement is how do i use the previous command that was executed. I tried the option 'ESC' and then 'k'. It displays the characters like '^[[A' etc. How do I... (2 Replies)
Discussion started by: vskr72
2 Replies

8. Shell Programming and Scripting

Previous Command

We have a Solaris Server and I am acessing it through telnet to run various commands for my data validation like GREP, SED, AWK etc. My requirement is how do i use the previous command that was executed. I tried the option 'ESC' and then 'k'. It displays the characters like '^[[A' etc. How do I... (1 Reply)
Discussion started by: vskr72
1 Replies

9. UNIX for Advanced & Expert Users

Previous Command

We have a Solaris Server and I am acessing it through telnet to run various commands for my data validation like GREP, SED, AWK etc. My requirement is how do i use the previous command that was executed. I tried the option 'ESC' and then 'k'. It displays the characters like '^[[A' etc. How do I... (0 Replies)
Discussion started by: vskr72
0 Replies

10. UNIX for Dummies Questions & Answers

Seeing previous command

Guys, In work we have just gotten a new HP 9000 server and I'm trying to set it up so that if I press <Up arrow> key I can see the command I typed in last(and press enter to run it again). Can anyone advise how to set this up. One friend suggested I touch a file called .toucheditXXXX (I cant... (4 Replies)
Discussion started by: JackieChan
4 Replies
Login or Register to Ask a Question
PSPRESENT(1)						      General Commands Manual						      PSPRESENT(1)

NAME
pspresent - fullscreen PostScript presentation tool SYNOPSIS
pspresent [options] file.ps DESCRIPTION
pspresent is a tool that displays PostScript slides in fullscreen, for giving presentations. Navigation is simple, and the display is dou- ble-buffered for seamless transitions between slides. The actual rendering is done in the background using Ghostscript. OPTIONS
-h Show summary of options. -o Do not override window manager. pspresent will attempt to disable decorations and resize itself to the size of the screen, but will otherwise co-operate with your window manager (which may mean that it is not truly fullscreen). -s Limit pspresent to only use the given head on a XINERAMA display. -O Portrait|Landscape|Upside-Down|Seascape Override orientation. -l Loop mode; go to start of document when at end, and vice versa. -t[delay] Automatic slideshow mode. The delay is optional, the default value is 20 seconds. -Tfile Automatic slideshow mode. The file contains one integer value per line, corresponding to the delay between the current slide and the next one. You must put a value for each page of your document (count overlays, too). A value of 0 will disable the timer for the current slide. COMMANDS
The following keys can be used from within pspresent to navigate the slides. If Shift is depressed, then only the last page of each series of overlays is shown (an overlay set is identified as a series of pages with the same logical page number). spacebar page down right arrow down arrow Move to the next slide. If Shift is depressed, skips overlays. backspace page up left arrow up arrow Move to the previous slide. If Shift is depressed, skips overlays. home Warp to the start of the presentation. end Warp to the end of the preesentation. number enter Warp to slide number. escape q Quit the program. The mouse buttons can also be used to navigate through a presentation. left button Move to the next slide. middle button Quit the program. right button Move to the previous slide. If Shift is used together together with the navigation keys or buttons, then only the last page of each series of overlays is shown (an overlay set is identified as a series of pages with the same logical page number). AUTHOR
pspresent was written by Matt Chapman <matthewc@cse.unsw.edu.au> This manual page was originally written by Jamie Wilkinson <jaq@debian.org>. January 24, 2005 PSPRESENT(1)