Sponsored Content
Full Discussion: Previous command
Operating Systems HP-UX Previous command Post 302166385 by new2ss on Monday 11th of February 2008 09:47:10 PM
Old 02-11-2008
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 websites quoted as saying ".. using control key ^P .. ". What keys do i type to get the control P ? I tried shift + P and Ctrl + P, neither worked.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

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... (5 Replies)
Discussion started by: luft
5 Replies

2. 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

3. 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

4. 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

5. 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

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

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

8. 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

9. 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

10. 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
MPROMPT(1)							      mprompt								MPROMPT(1)

NAME
mprompt - simple prompt-based control for mpd SYNOPSIS
mpompt [-s] [-m key=key] [-t n] [-f] [tty] [-T] [host] DESCRIPTION
mprompt is a mpd client with a prompt-based interface. It is designed to be usable on a headless machine. At the prompt, enter the name of a playlist, or part of the name of an album, artist, or song. Matching items will start playing. You can also paste in urls to stream. (If the perl String::Approx module is available, it will be used to handle typos, etc in the names you enter.) Use the left and right arrow keys to adjust volume, and the up and down arrow keys to move through the playlist. The Tab and Enter keys can both be used to pause and unpause playback. (Enter toggles pause only if nothing has been entered at the prompt.) Example of how to run mprompt in /etc/inittab: 1:2345:respawn:/usr/bin/mprompt /dev/tty1 OPTIONS
-s This option allows shell commands to be typed in to mprompt, to be run by whatever user it is running as. (Typically root if it is run from /etc/inittab). To enter a shell command, type a "!", followed by the command to run, followed by Enter. -m key=key This option allows remapping keys. Any key can be remapped to any other key, which is useful to support keyboard with unusual key layouts, or missing keys. For alphanumeric and punctuation keys, individual symbols can be remapped. For example, "-m a=b" will turn each entered "a" into "b". For other keys, use the following names: <return> <tab> <space> <up> <down> <left> <right> <backspace> For example, -m "n=<down>" will map the "n" key to the down arrow, causing that key to change to the next track; -m "<space>=<return>" will make the space bar act as a pause. It's possible to swap keys too. For example, -m "<down>=<up>" -m "<up>=<down>" A single key can also be bound to a series of keystrokes. For example, -m "1=Mule Variations<return>" will cause the "1" key to play the "Mule Variations" album, a nice choice. -t n Adds a timeout, a specified number of seconds after which the entry on the command line will be cleared. Useful for headless systems, to avoid cat-on-keyboard confusing your later commands. -T Enables terse output mode. This mode tries to avoid displaying excessive or complex things, with the intent that mprompt's output can be piped into a speech synthesiser, such as espeak. SEE ALSO
vipl(1) mptoggle(1) mpd(1) AUTHOR
Copyright 2009 Joey Hess <joey@kitenet.net> Licensed under the GNU GPL version 2 or higher. http://kitenet.net/~joey/code/mpdtoys perl v5.10.1 2010-03-06 MPROMPT(1)
All times are GMT -4. The time now is 02:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy