Sponsored Content
Top Forums Shell Programming and Scripting up down arrow key and edit on command line. Post 302581672 by ekb on Tuesday 13th of December 2011 09:06:50 PM
Old 12-13-2011
I am at os 6.1.0.0, TERM=vt100

This solutions works but I can not edit command line using unix commands.

https://www.unix.com/unix-dummies-que...d-history.html

If I do set -o vi then up down arrow does not work also I can not edit at command line.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

vi down arrow key not working

i am using windows nt hummingbird 7.0 host explorer telnet emulation. I have two connections to two different unix machines. on one, the down arrow works fine in vi (it woks like the j option on the other it looks like it is giving me a new line above (like option O) and inserting a letter "B";... (2 Replies)
Discussion started by: artjaniger
2 Replies

2. UNIX for Dummies Questions & Answers

ksh: how to make [up arrow] recall command history

I want to get my up arrow key to recall my previous commands in Korn shell. Anyone help please? thanks a bunch! BG (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

3. UNIX for Dummies Questions & Answers

edit each line in the file

I am trying to edit each line in a file. The file has several columns delimitted by '|'. I need to take out the last two columns. Each line starts with a unique word through which I am storing the lines in a variable and cutting the last two colums. But, when I am echoing the line, it is... (2 Replies)
Discussion started by: chiru_h
2 Replies

4. UNIX for Dummies Questions & Answers

Using the Esc key to complete command line typing

Dear Techs, In the past on a different box (HP) I use to be able to complete something I was typing by entering a portion of the filename in the pwd and I would hit the Esc key and it would match the rest of the filename. I did this without understanding how it was setup. Now I am on a new... (1 Reply)
Discussion started by: jxh461
1 Replies

5. Shell Programming and Scripting

Is there any way to make up arrow show last command in CSh?

Hi, I've been looking for a way to make the up arrow show the last command in csh, like how it does in bash/ksh. I've been googling and just can't find anything.....anybody have any ideas? thanks! (5 Replies)
Discussion started by: sayeo
5 Replies

6. UNIX and Linux Applications

command scrolling using arrow keys

hi, can anyone tell me how to enable arrow keys to scroll thru the commands on command prompt. I am using C shell ( I know, in k shell, set -o vi would enable vi command history, but set -o doesnte exist in c shell) (4 Replies)
Discussion started by: hemangi13
4 Replies

7. Shell Programming and Scripting

How does BASH handle KEY BOARD "up arrow"??

hello sir, I am studying the BASH shell. I was wondering how the BASH is able to handle the "up arrow" key to give the commands that were previously typed by us. Can you please tell me the code to do such an operation. I want to handle more such keys and put KEY BOARD short cuts to the BASH shell. (1 Reply)
Discussion started by: nsharath
1 Replies

8. UNIX for Advanced & Expert Users

command to replace the entire line from the key point

Hi everyone I am new to Unix. I got stuck up by small issue. I have text file something like this abc 'xyz' '5' lmn 'pqr' '7' i want to replace the abc 'xyz' '5' to abc 'xyz' '6' but i have a key as 'xyz' based on this key i want to do that. I am not aware of how to use sed... (7 Replies)
Discussion started by: Vijayaragavan
7 Replies

9. UNIX for Dummies Questions & Answers

enable up arrow key to get last cmd..

Hello all, I wanted to know how can i enable the up arrow key to go to last cmd....on any UNIX system....looks like in some of my system(linux mostly) the up arrow key work to go to last cmd....but on hp-ux or sun...the up arrow key dose not work....is there some setting i can enable at terminal... (3 Replies)
Discussion started by: abdul.irfan2
3 Replies

10. Shell Programming and Scripting

edit a line for getting inputs

Hello Everybody, I have a file with data like this 8z:1 15y:0 7x:0 12w:1 ... ... I would like read each line through a loop and will needing to get the input from each line like this For 8z:1; a=8,b=1 15y:0; a=15,b=0 7x:0; a=7,b=0 Please let me know of a way to... (5 Replies)
Discussion started by: leo.maveriick
5 Replies
shell_builtins(1)														 shell_builtins(1)

NAME
shell_builtins, case, for, foreach, function, if, repeat, select, switch, until, while - shell command interpreter built-in commands The shell command interpreters csh(1), ksh(1), and sh(1) have special built-in commands. The commands case, for, foreach, function, if, repeat, select, switch, until, and while are commands in the syntax recognized by the shells. They are described in the Commands section of the manual pages of the respective shells. The remaining commands listed in the table below are built into the shells for reasons such as efficiency or data sharing between command invocations. They are described on their respective manual pages. | Command | Shell alias |csh, ksh bg |csh, ksh, sh break |csh, ksh, sh case |csh, ksh, sh cd |csh, ksh, sh chdir |csh, sh continue |csh, ksh, sh dirs |csh echo |csh, ksh, sh eval |csh, ksh, sh exec |csh, ksh, sh exit |csh, ksh, sh export |ksh, sh false |ksh fc |ksh fg |csh, ksh, sh for |ksh, sh foreach |csh function |ksh getopts |ksh, sh glob |csh goto |csh hash |ksh, sh hashstat |csh history |csh if |csh, ksh, sh jobs |csh, ksh, sh kill |csh, ksh, sh let |ksh limit |csh login |csh, ksh, sh logout |csh, ksh, sh nice |csh newgrp |ksh, sh nohup |csh notify |csh onintr |csh popd |csh print |ksh pushd |csh pwd |ksh, sh read |ksh, sh readonly |ksh, sh rehash |csh repeat |csh return |ksh, sh select |ksh set |csh, ksh, sh setenv |csh shift |csh, ksh, sh source |csh stop |csh, ksh, sh suspend |csh, ksh, sh switch |csh test |ksh, sh time |csh times |ksh, sh trap |ksh, sh true |ksh type |ksh, sh typeset |ksh ulimit |ksh, sh umask |csh, ksh, sh unalias |csh, ksh unhash |csh unlimit |csh unset |csh, ksh, sh unsetenv |csh until |ksh, sh wait |csh, ksh, sh whence |ksh while |csh, ksh, sh Bourne Shell, sh, Special Commands Input/output redirection is now permitted for these commands. File descriptor 1 is the default output location. When Job Control is enabled, additional Special Commands are added to the shell's environment. In addition to these built-in reserved command words, sh also uses: : No effect; the command does nothing. A zero exit code is returned. .filename Read and execute commands from filename and return. The search path specified by PATH is used to find the directory con- taining filename. C shell, csh Built-in commands are executed within the C shell. If a built-in command occurs as any component of a pipeline except the last, it is exe- cuted in a subshell. In addition to these built-in reserved command words, csh also uses: : Null command. This command is interpreted, but performs no action. Korn Shell, ksh, Special Commands Input/Output redirection is permitted. Unless otherwise indicated, the output is written on file descriptor 1 and the exit status, when there is no syntax error, is zero. Commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari- able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not performed. In addition to these built-in reserved command words, ksh also uses: * : [ arg ... ] The command only expands parameters. * .file [ arg ..Read the complete file then execute the commands. The commands are executed in the current shell environment. The search path specified by PATH is used to find the directory containing file. If any arguments arg are given, they become the posi- tional parameters. Otherwise, the positional parameters are unchanged. The exit status is the exit status of the last com- mand executed. the loop termination test. intro(1), alias(1), break(1), cd(1), chmod(1), csh(1), echo(1), exec(1), exit(1), find(1), getoptcvt(1), getopts(1), glob(1), hash(1), his- tory(1), jobs(1), kill(1), ksh(1), let(1), limit(1), login(1), logout(1), newgrp(1), nice(1), nohup(1), print(1), pwd(1), read(1), read- only(1), set(1), sh(1), shift(1), suspend(1), test(1B), time(1), times(1), trap(1), typeset(1), umask(1), wait(1), chdir(2), chmod(2), creat(2), umask(2), getopt(3C), profile(4), environ(5) 29 Jun 2005 shell_builtins(1)
All times are GMT -4. The time now is 02:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy