Command line traversal


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Command line traversal
# 1  
Old 04-05-2005
Command line traversal

What is a key, if on command line I have to trverse left & right word by word, instead of character by character?
# 2  
Old 04-05-2005
I have found it -

Esc + w = fwd traversal
Esc + b = bwd traversal
# 3  
Old 04-05-2005
I tend to run my command line in vi mode via, 'set -o vi'. It removes the need for the Esc and all vi's wonderful shortcuts work.

Keith
# 4  
Old 04-05-2005
Quote:
Originally Posted by kduffin
I tend to run my command line in vi mode via, 'set -o vi'. It removes the need for the Esc and all vi's wonderful shortcuts work.
Agreed Smilie (Except you still need to press Esc to get into "command mode" Smilie)

With vi mode, you can use e, b and w to traverse the line by word, and then h and l to move char by char....

Cheers
ZB
# 5  
Old 04-05-2005
Good point Smilie
# 6  
Old 06-03-2005
this works great in ksh, but in csh it is not working.

i used setenv -o vi, which is ok, but then when I use esc on the command line i get ^[

any ideas?
# 7  
Old 06-03-2005
Use tcsh instead, and then type

bindkey -v

If you like it, add it to your shell's initialisation files....

Cheers
ZB
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl command line option '-n','-p' and multiple files: can it know a file name of a printed line?

I am looking for help in processing of those options: '-n' or '-p' I understand what they do and how to use them. But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.) I did try it and -n works on 2 files. Question is: - is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies

2. Shell Programming and Scripting

sed command to replace a line in a file using line number from the output of a pipe.

Sed command to replace a line in a file using line number from the output of a pipe. Is it possible to replace a whole line piped from someother command into a file at paritcular line... here is some basic execution flow.. the line number is 412 lineNo=412 Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies

3. UNIX for Dummies Questions & Answers

To find and display the middle line in a file using single line command.

Hi all, How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies

4. Shell Programming and Scripting

sed command to replace a line at a specific line number with some other line

my requirement is, consider a file output cat output blah sdjfhjkd jsdfhjksdh sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf hellow there this doesnt look good et cetc etc etcetera i want to replace a line of line number 4 ("this doesnt look good") with some other line ... (3 Replies)
Discussion started by: vivek d r
3 Replies

5. Shell Programming and Scripting

file traversal

Hi, I have to get some value of the from a flat file and my file format is like this. ABC DEF HIJ=1 XYZ xyz HIJ=2 So i need to make sure i get all the value of HIJ under XYZ and not ABC. (4 Replies)
Discussion started by: nidhink
4 Replies

6. Shell Programming and Scripting

AWK File Traversal

Hey, I'm working on a file traversal and extraction function and am having problems. So, my script is finding all files in a directory. Each file has the same format. I need to extract a field from the 4th line of each file..... hence why I am using the substring on NR == 4. So, I am... (11 Replies)
Discussion started by: beefeater267
11 Replies

7. UNIX for Advanced & Expert Users

need help in file traversal via FTS(3)

Hi friends, I was trying to traverse a file using FTS(3) . this is the code below.. but I am getting segmentation error in the line fts_read(...) , anybody have any idea , why it is? Please, help me. Thanks in advance.... (2 Replies)
Discussion started by: jack85
2 Replies

8. Shell Programming and Scripting

Creating breadth traversal binary tree

I almost have the entire script written. however the problem is how would i assign the global variable to terminate the process from the bottom up to ensure the child terminates so the parent can. ex. I am proccess 1 I am proccess 2 etc Here is the code $ cat tree.c ... (3 Replies)
Discussion started by: slurpeyatari
3 Replies
Login or Register to Ask a Question