LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Not able to use bash mode (https://www.linuxquestions.org/questions/linux-newbie-8/not-able-to-use-bash-mode-4175579486/)

muneshshar 05-10-2016 10:57 PM

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.

pintooo15 05-10-2016 11:08 PM

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

sag47 05-10-2016 11:19 PM

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

muneshshar 05-11-2016 05:00 AM

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.

keefaz 05-11-2016 06:22 AM

Quote:

Originally Posted by muneshshar (Post 5543581)
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'...

dwnthk 05-11-2016 07:01 AM

Are you using utf-8 fonts in your machine? How about vim?

rtmistler 05-11-2016 07:49 AM

Quote:

Originally Posted by keefaz (Post 5543734)
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.

malekmustaq 05-11-2016 11:04 AM

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.

pan64 05-11-2016 12:03 PM

you can try:
Code:

stty erase ^?
stty erase ^h

probably one of them will solve this issue (before you start vi)

AnanthaP 05-12-2016 05:26 AM

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

jpollard 05-12-2016 07:04 AM

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


All times are GMT -5. The time now is 04:47 PM.