LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2016, 10:57 PM   #1
muneshshar
LQ Newbie
 
Registered: May 2016
Posts: 2

Rep: Reputation: Disabled
Not able to use bash mode


Hello!
in my linux machine whenever I put the command $bash, I am getting below error
ksh: bash: not found

Now I am not able to get my previous run command using keyboard arrow keys.
Not able to delete any character in VI editor even after entering into insert mode.

Please help me. this is my client provided machine so I can not go and directly change the settings.

Thanks in advance.
 
Old 05-10-2016, 11:08 PM   #2
pintooo15
Member
 
Registered: May 2004
Location: India
Distribution: openSUSE Tumbleweed
Posts: 94

Rep: Reputation: Disabled
Not able to use bash mode

Not sure which flavor this might be but I would try to find whereis bash located and put the full path instead of just the command. e.g. /bin/bash
 
Old 05-10-2016, 11:19 PM   #3
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Time to learn ksh?

If you can't install bash (i.e. the client doesn't want you to) then you have to make do with the utilities at hand. I just did a search for introduction to ksh and I feel it would be a pretty straight forward transition to using (being an expert at bash).

There are minor differences in scripting. http://tldp.org/LDP/Bash-Beginners-G...tml/x7369.html

Learn how to recall history in ksh. Here's a fine article to save you some searching. http://www.kingcomputerservices.com/...ne_editing.htm
 
Old 05-11-2016, 05:00 AM   #4
muneshshar
LQ Newbie
 
Registered: May 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Smile

Thanks sag47.

Please let me know if I want to go with bash mode only then what change or utility need to be installed in machine.

I can ask to client, he might agree for the same.
 
Old 05-11-2016, 06:22 AM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by muneshshar View Post
Not able to delete any character in VI editor even after entering into insert mode.
.
I don't think this is related to the shell you use, to delete a character I put the cursor on the character I want to delete in command mode and I press 'x'...
 
Old 05-11-2016, 07:01 AM   #6
dwnthk
Member
 
Registered: May 2016
Location: Hong Kong
Distribution: Slackware 14.1 + Fluxbox
Posts: 68

Rep: Reputation: Disabled
Are you using utf-8 fonts in your machine? How about vim?
 
Old 05-11-2016, 07:49 AM   #7
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by keefaz View Post
I don't think this is related to the shell you use, to delete a character I put the cursor on the character I want to delete in command mode and I press 'x'...
I agree, not sure that bash is required to make vi work properly. This instead sounds like terminal settings.

What's the client want you to do? Call me weird, but someone gives me a system to develop with, I tune it to operate as I need to so that I can do the job they're paying me to get done.

Last edited by rtmistler; 05-11-2016 at 07:50 AM.
 
Old 05-11-2016, 11:04 AM   #8
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Quote:
Please let me know if I want to go with bash mode only then what change or utility need to be installed in machine.
I can ask to client, he might agree for the same.
If the client permits you can download and install bash. You can choose downloading source from here, or you can install it from a ready package whatever distro you are using. Then from your environment
Code:
export SHELL=bash
or in the /etc/profile you can fix to default on Bash shell by defining SHELL, or just call Bash in the terminal when needed.

Hope that helps.

Good luck.

m.m.
 
Old 05-11-2016, 12:03 PM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
you can try:
Code:
stty erase ^?
stty erase ^h
probably one of them will solve this issue (before you start vi)
 
Old 05-12-2016, 05:26 AM   #10
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
How did vi come into it in the first place?

Is it because you are trying to shell out from vi? That would explain why your command history is not available. What is the prompt after you type $bash? Try ctrl+d after the error

OK

Last edited by AnanthaP; 05-12-2016 at 05:29 AM.
 
Old 05-12-2016, 07:04 AM   #11
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
What system are you on? AIX may not have bash installed. It also may not have vim.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
emacs or vi mode for bash sigint-ninja Linux - Newbie 3 01-27-2016 02:59 AM
vi split mode with one window Bash? theKbStockpiler Programming 4 09-20-2011 01:11 AM
Bash vi mode not working perfect hhamid Linux - Newbie 14 08-16-2010 03:36 AM
Two bash questions (completion & vi mode) blehamiga Linux - Newbie 1 06-05-2008 10:31 AM
Text Mode Editor: What Choices? BASH, VI, EMACS? LinxAI Linux - Newbie 12 03-28-2004 11:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration