Sponsored Content
Operating Systems AIX Matching command scroll - ksh Post 302425405 by bakunin on Thursday 27th of May 2010 08:55:20 PM
Old 05-27-2010
Quote:
Originally Posted by juredd1
Code:
set -o vi

I don't know the official term
"VI command line editing mode". ;-)

Basically you have a vi-editor with only one line visible (and the history-file as text open) at the commandline. (Almost) every vi-command will work on the commandline too:

ESC (to set the editor from insert- to command-mode) and then:
  • k - a line up (therefore: last command)
  • j - a line down (therefore: next command, if you have already gone back some)
  • l - move cursor a character right
  • h - move cursor a character left
  • w - move cursor to first character of the word right to the cursor
  • b - move cursor to first character of the word left to the cursor
  • W/B - same as w/b but only taking whitespace as word boundaries into consideration
    This means: let text be "abc/def/ghi". If the cursor is on "g", then "w" brings you to the third "/", the next "w" to "d", etc., while "W" brings you to "a".
  • 0 - move to first character in the line

  • / - search through command history (all regexps allowed)
  • n - repeat last search and go to next hit
  • N - repeat last search and go to previous hit

  • i - reenter insert mode
  • a - append: insert right after cursor position
  • A - append at end of line

  • v - open a full vi with the command line as text (saving & exiting executes the command)
  • # - put a comment sign in front of the command and put it into history
    This won't execute anything, but saves a command(-part) for future use in the history file.

I hope this helps.

bakunin

Last edited by bakunin; 05-27-2010 at 10:02 PM..
These 3 Users Gave Thanks to bakunin For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh pattern matching

I try to use the pattern substitution operators as documented in the O'Reilley "Learning the Korn Shell" but it doesn't seem to work as advertised. This works all right: var='Regular expressions rules!' $ echo ${var//e/#} R#gular #xpr#ssions rul#s! The docs says that using !(expr)... (5 Replies)
Discussion started by: ripat
5 Replies

2. UNIX for Dummies Questions & Answers

Seeing the screen output beyond the scroll capability for the last run command

HI , I forgot to redirect my op to a file.The op which is quite huge , thus printed on the screen.However bcoz of the limited viewing in the screenI can not see the whole of the output.. Is there anyway I can see the full op.My run takes half a day for finnishing ..So I am refraining... (1 Reply)
Discussion started by: bimukt
1 Replies

3. AIX

aixterm scroll?

on a AIX sys i have been trying to get the mouse scroll wheel to page the terminal for about 2 yrs now on aixterm. any ideas. the below syntax does not work in aixterm but does work in xterm. ------------------------- this does not work in aixterm but does work in xterm,, with a cat Xdefult |... (2 Replies)
Discussion started by: nullwhat
2 Replies

4. Shell Programming and Scripting

awk/sed Command : Parse parameter file / send the lines to the ksh export command

Sorry for the duplicate thread this one is similar to the one in https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121 Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies

5. Shell Programming and Scripting

Pattern matching in ksh

In the Korn shell is it possible to truncate a pattern like this: - ) ]] So that it is not necessary to enter 8 times? (2 Replies)
Discussion started by: steadyonabix
2 Replies

6. Shell Programming and Scripting

Changing the scroll limit in ksh

I don't have my SysV bible with me currently and I can't remember how to change the amount of lines visible in my shell. Currently I can only scroll back to see the last 100 lines of stdout. Any help is greatly appreciated. blessings, Tony <>< (2 Replies)
Discussion started by: port43
2 Replies

7. Shell Programming and Scripting

ksh Multiple Pattern Matching Operators

I figured this would be simple, but I am stuck. Variable longpath="/dir1/dir2/dir3/filename.stuff.morestuff.garbage" I want to end up with just "filename.extra.moreextra". So, I want to get rid of the path and .garbage I want to do this with just ksh internals. So, no sed,grep,awk,expr,... (4 Replies)
Discussion started by: Topaz
4 Replies

8. UNIX for Dummies Questions & Answers

help with continous scroll

I figured out my question. mods please delete. Thank you (2 Replies)
Discussion started by: rpmischris
2 Replies

9. Shell Programming and Scripting

Matching a block of data sed or ksh

I have the need to check content of very many files for a block of text. I know the data should match for instance/as an example the following The list of characters bugs bunny tom and jerry Mighty mouse Felix the cat / In the first step, I isolated the interesting data by... (3 Replies)
Discussion started by: popeye
3 Replies

10. UNIX for Dummies Questions & Answers

Unable to scroll to the top of the output of a command

Hello, I am a beginner, I have currently Solaris 11 on a vmware machine. Whenever I type a command like 'ls' the screen scrolls to the end of the screen. I am unable to see the entire list of directories and files. I have tried ls |page command, but looking out for a better option. (3 Replies)
Discussion started by: farheenprasad
3 Replies
All times are GMT -4. The time now is 10:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy