Sponsored Content
Top Forums Shell Programming and Scripting Any shell or hack that makes the shell command line take vi commands? Post 302649075 by Chubler_XL on Wednesday 30th of May 2012 10:16:04 PM
Old 05-30-2012
In ksh/bash use the following at the command line (or in ~/.profile or ~/.bash_profile):
Code:
set -o vi

If your on linux, Mac OS, *BSD you can put the following in ~/.inputrc (or /etc/inputrc for system wide), this will work for most command line programs that use the readline library (eg ftp, bash, etc).
Code:
set editing-mode vi


Last edited by Chubler_XL; 05-30-2012 at 11:25 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

KORN Shell - Spawn new shell with commands

I want to be able to run a script on one server, that will spawn another shell which runs some commands on another server.. I have seen some code that may help - but I cant get it working as below: spawn /usr/bin/ksh send "telnet x <port_no>\r" expect "Enter command: " send "LOGIN:x:x;... (2 Replies)
Discussion started by: frustrated1
2 Replies

2. Shell Programming and Scripting

How to run unix commands in a new shell inside a shell script?

Hi , I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell. So scenario is that - I need to have one shell script which is ran as a part of crontab - in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies

3. UNIX for Dummies Questions & Answers

what are some different commands in c shell and korn shell??

I am doing this simple script using c shell and korn shell. The commands I use are fgrep , ls, and also some redirecting. Is there any difference in using both of these commands in c shell and korn shell? Thanks and sorry for the stupid question. (1 Reply)
Discussion started by: EquinoX
1 Replies

4. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

5. UNIX for Dummies Questions & Answers

Passing command line argument between shell's

Hi, I am facing a problem to pass command line arguments that looks like <script name> aa bb "cc" dd "ee" I want to pass all 5 elements include the " (brackets). when I print the @ARGV the " disappear. I hope I explain myself Regards, Ziv (4 Replies)
Discussion started by: zivsegal
4 Replies

6. UNIX for Dummies Questions & Answers

Command line ok but not shell

I want to substitute a charactor "PAN" with "TAN" in a shell, I used sed command in shell, it wo'nt work but the same is run from command prompt it was successful. the command is sed ' s/PAN/TAN/g ' <i/p> > <o/p> sed ' s/^M/^M/g ' <i/p> > <o/p> (1st ^M is Ctrl+V+M, 2nd should be line feed/next... (2 Replies)
Discussion started by: anil_kut
2 Replies

7. Shell Programming and Scripting

Shell Text Based Game, This Error Makes NO sense. Please help

Okay so I'm making a simple text based game that branches into different scenarios. By branching I mean branching off into whole different files with that part of the game in it. I got tired of working on scenario 1 so I'm working on scenario 2. As I get started and try to test it, I get an... (3 Replies)
Discussion started by: lemonoid
3 Replies

8. Shell Programming and Scripting

Embeded shell variable in command line

Hello, I know this is a situation about the single quote and double literal, but I could not figure out after many search. I need to loop through thousands of different BACs sequencing to optimize kmer individually. IN=/PATH/TO/INPUT/FILES for sample in S{01..1096} do run_program... (9 Replies)
Discussion started by: yifangt
9 Replies

9. UNIX for Dummies Questions & Answers

Ls -1 at Command Line vs in a Shell Script

Hello, I have symbolic links to a bunch of directories (all starting with the letter X) in the cwd. When I run the following on the command line, I get the list as I want it. ls -1 X* > dir.list However when I run it in a shell script like given below, it lists all the files in each of... (3 Replies)
Discussion started by: Gussifinknottle
3 Replies

10. Shell Programming and Scripting

Need help with shell commands (not sure which command is appropriate)

Dear All, I have 2 files namely file1 and file2. in file1 I have something like this Min X = -250.000000, Max X = 250.000000 Min Y = -95.000000, Max Y = 95.000000 Min Z = -95.000000, Max Z = 136.500000 I have to write this date to file2 as xMin -250.000000; xMax 250.000000; yMin... (15 Replies)
Discussion started by: linuxUser_
15 Replies
RBASH(1)						      General Commands Manual							  RBASH(1)

NAME
rbash - restricted bash, see bash(1) RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the follow- ing are disallowed or not performed: o changing directories with cd o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV o specifying command names containing / o specifying a file name containing a / as an argument to the . builtin command o specifying a filename containing a slash as an argument to the -p option to the hash builtin command o importing function definitions from the shell environment at startup o parsing the value of SHELLOPTS from the shell environment at startup o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators o using the exec builtin command to replace the shell with another command o adding or deleting builtin commands with the -f and -d options to the enable builtin command o using the enable builtin command to enable disabled shell builtins o specifying the -p option to the command builtin command o turning off restricted mode with set +r or set +o restricted. These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script. SEE ALSO
bash(1) GNU Bash-4.0 2004 Apr 20 RBASH(1)
All times are GMT -4. The time now is 03:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy