Sponsored Content
Top Forums UNIX for Dummies Questions & Answers editing bash command line with vi Post 27568 by LivinFree on Tuesday 3rd of September 2002 09:36:40 PM
Old 09-03-2002
You should be able to put a "set -o vi" in your .bashrc...
I think you will have to press [Esc] first to put it in edit mode...
Try it out.

Type "set -o" to get a list of options - the only downside is that you won't be in emacs mode anymore, so arrows won't work (to scroll up, you'll have to type "[Esc]" then "k" for example).
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Single line file editing command?

Hello everyone. I have been reading a lot about the various different text editors at my disposal through Unix, but I just can't seem to close the deal for what I am trying to do. Is there a way to issue a single line command to edit a file where pattern=x, and do it non-destructively AND in-place?... (1 Reply)
Discussion started by: gator76
1 Replies

2. UNIX for Dummies Questions & Answers

ksh command line editing text being overwritten

hi. i'm using ksh with set -o vi. if i am far down in a directory and try to edit the command line (esc-k to retrieve previous command) the cursor is being positioned over to the left on top of the directory text making the text very difficult to read or work with. seems to be problem with long... (2 Replies)
Discussion started by: jeffa123
2 Replies

3. AIX

Typing "bash" at the command line spawns two bash processes

Server: IBM p770 OS: AIX 6.1 TL5 SP1 When one of our develoeprs types "bash" on the command line to switch shells, it hangs. For some reason, two bash processes are created....the first bash process spawns a second bash process in the same console, causing a hang. Anyone have any idea what... (2 Replies)
Discussion started by: wjssj
2 Replies

4. UNIX for Dummies Questions & Answers

Running set options from the command line and bash command

I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing set you can also use them "on the command line when running a script..." and it lists this in a small table: set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies

5. Shell Programming and Scripting

bash, command line substitution

I have one script calling another with a set of strings that includes white space. Script A calls Script B with these input strings: one two "th ree" Script B pulls apart the arguments correctly: arg0 = one, arg1 = two, arg2 = "th ree" if I call it from within Script A like so:... (10 Replies)
Discussion started by: skippyV
10 Replies

6. Shell Programming and Scripting

Bash - Loading a command's output line by line into an array

I have been trying this a lot of different ways and haven't found too much online. Here's what I've got so far: j=0 declare -a first zero=(`cat $tmpfile`) for i in "${zero}" do command $i >> "${first}" ... (4 Replies)
Discussion started by: Azrael
4 Replies

7. Shell Programming and Scripting

Cp command works on command line but not in bash

The below command moves all the .vcf files into the directory. cp /home/cmccabe/Desktop/test/vcf/overall/stats/*.vcf /home/cmccabe/Desktop/NGS/annovar When I use a bash wrapper the target.txt gets created but the text files do not get copied. All the paths are the same, but not sure why... (2 Replies)
Discussion started by: cmccabe
2 Replies

8. Shell Programming and Scripting

How to run several bash commands put in bash command line?

How to run several bash commands put in bash command line without needing and requiring a script file. Because I'm actually a windows guy and new here so for illustration is sort of : $ bash "echo ${PATH} & echo have a nice day!" will do output, for example:... (4 Replies)
Discussion started by: abdulbadii
4 Replies

9. UNIX for Beginners Questions & Answers

Question on bash command line

OS : RHEL / Oracle Linux 6.8 In bash shell, how can I replace a character under the cursor with another character ? In the below example , after I typed the following line, I realized that I meant 7013 and not 2013. So I move the cursor to the left and keep it on top of 2 (of 2013) and I want... (7 Replies)
Discussion started by: kraljic
7 Replies
FILTERM(1)							Linux User's Manual							FILTERM(1)

NAME
filterm - filter terminal input and/or output SYNOPSIS
filterm INPUT OUTPUT [COMMAND [ARGS]] DESCRIPTION
Execute the specified COMMAND (default is the shell), filtering terminal input and/or output. It can help e.g. when our terminal is unable to display non-ASCII characters or to enter them from the keyboard. It also makes writing var- ious terminal filters easier. INPUT and OUTPUT are names of konwert's filters - they are passed as the first argument to the konwert(1) program. filterm - OUTPUT fil- ters only output, and filterm INPUT - only input. The command - executes the shell as a login shell. It differs from konwert INPUT | COMMAND | konwert OUTPUT in that the command is executed on a pseudo-terminal, so full-screen programs work correctly. The filters have to output the characters as soon as they receive all necessary input, without buffering. trs(1) scripts are OK, but sed(1) or awk(1) or tr(1) scripts are not. In C you may use read(), getchar(), fread(), and write(), but putchar() and fwrite() only together with fflush(stdout). In C++: cin.get(), cout.put(), and cout <<. In perl: sysread, getc, read, and syswrite, but print only with $| = 1. The input filter will have set the environment variable FILTERM=in, and the output one - FILTERM=out. This way some filters can slightly alter their behaviour when working for filterm. OPTIONS --help display help and exit --version output version information and exit FILTERS FOR FILTERM
See konwert(1). Additionally the following konwert's filters are designed only for filterm: tyldy (input) Polish ~a~c~e~l~n~o~s~x~z lewyap (input) Polish `a`c`e`l`n`o`s`x`z boldpl (output) ASCII with Polish letters shown as bold. pinectrlchars (output) Replaces the characters 128..159 shown by the Pine (or another program) as ^A..^B back to the real 128..159. 512bold (output) Changes the mapping of colors in 512-character mode, which restricts the number of colors to eight. The palette is dynamically changed to contain the eight most recently used colors. When more colors are used at once, some of them display incorrectly. 512bold1 (output) Changes the mapping of colors in 512-character mode. Instead of ignoring the intensity, the following colors are available: black, red, green, white, blue, light magenta, light cyan, light gray; others are substitutied with approximations. This gives better effect, allowing to show the intensity, with the side-effect of belying the hue of some colors. kbdmacros (input) Keyboard macros. A sequence of keys can be recorded with Esc Ctrl-A SEQUENCE Esc Ctrl-E SHORTCUT - after which, if you press the SHORTCUT, the SEQUENCE will be generated instead. Later such assignment can be deleted with Esc Ctrl-A Esc Ctrl-E SHORTCUT Esc Ctrl- E. Instead of Esc Ctrl- you often may press Ctrl-Alt-. The defined shortcuts, together with the above redefinable key combinations used to define them, are stored in the ~/.kbdmacros file. Note: when you redefine a sequence, all its prefixes will not be passed through immediately, but wait until it can be unambiguously told which sequence was actually input. This includes escape sequences representing some extended keys. SEE ALSO
konwert(1) BUGS
512bold filter is not perfect. Some escape sequences may be emulated incorrectly. Additionally, colors changed in multiple steps or not used unnecessarily allocate some of the eight colors. COPYRIGHT
filterm filters terminal input and/or output. It forms part of the konwert package. Copyright (c) 1998 Marcin 'Qrczak' Kowalczyk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA AUTHOR
__("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.home.ml.org/ \__/ GCS/M d- s+:-- a21 C+++>+++$ UL++>++++$ P+++ L++>++++$ E->++ ^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP->+ t QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y- Konwert 30 Jul 1998 FILTERM(1)
All times are GMT -4. The time now is 11:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy