Which shell can I use on Linux?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Which shell can I use on Linux?
# 15  
Old 06-28-2017
Looks like your login shell is ksh.
I have to admit that I don't really understand your problem. Why do you ask if you vave to "convert sh /ksh to bash" if ALL your scripts should be running flawlessly with ksh as login shell? Both ksh and bash will run sh scripts as is as they offer a superset of sh syntax.
Where exactly do you run into problems?
This User Gave Thanks to RudiC For This Post:
# 16  
Old 06-28-2017
If your scripts are all written in ksh already, you should insist all your systems are installed with ksh in addition to bash. It will cost your company next to nothing compared with testing and modifying each script.

Andrew
This User Gave Thanks to apmcd47 For This Post:
# 17  
Old 06-28-2017
Yes, if you want ksh, install ksh. It's significantly different from both BASH and SH, in ways that might not matter or might fundamentally alter how your scripts are written (pipe subshell ordering).

Note there is more than one kind of ksh. There's crusty old-fashioned ksh88, which your distro likely has as pdksh, and modern fuller featured ksh93.
# 18  
Old 06-29-2017
Quote:
Originally Posted by digioleg54
If we have bash installed, I would go with bash, but it depends of big boss.
But what is you advise, which I can send to my manager use bash or use ksh? Of course the problem will get into "money" issue.
I didn't work a lot in ksh - as I said, I'm a Zsh guy - and do not know where ksh shines over bash. I would be surprised if in your case one had a noticeable performance advantage over the other.

If the choice is between bash and ksh, and money is and issue, you might argue in favour of bash, because this is by default installed on virtually any system I know. If you transfer your application to a new host, it might be that you would have to install ksh first, and since people don't do it in their free time, it indeed costs a litte bit.

Also, if you get stuck somewhere and search for help on the Net, many more people know bash than ksh (or Zsh, for this matter), and can help you. Still, given that bash and ksh have a lot in common, this is a small advantage.

So, my recommendation: First try to find on the Net a page comparing the features of ksh and bash. If you don't find anything which, in your opinion, is a big advantage for ksh, you don't make a mistake when going for bash.
# 19  
Old 06-29-2017
Hi.

I use mostly bash and some ksh. However, there are many more shells, several of which are special purpose, and many look interesting. For example, fish shell is cross-platform and seems to have a lot of features for interactive work. Here is a list with links:

Linux Links - The Linux Portal: Software/Shells

and here is a detailed comparison of the most-often encountered shells:

Comparison of command shells - Wikipedia

Best wishes ... cheers, drl
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash Shell Linux

I have a csv file that looks like this Name,Food,Sport James,Curry,Gym Darren,Pizza,Football Jim,Fish,Hockey James,Sushi,Tennis My code looks like this IFS="," sed 1d $file_name | while read Name Food Sport do mkdir -p $Name #echo "==================" #echo "Name: $Name" (3 Replies)
Discussion started by: darklord173
3 Replies

2. UNIX for Dummies Questions & Answers

Need some Help please with Linux shell script.

we need help with the syntax with this shell script, if you could create this shell script we can donate to a charity etc. we need to set up a directory called user3 inside directory user3 we need to create the following files : afile, anyfile, anotherfile, afiletest, bfile. bfiletest, cfile,... (3 Replies)
Discussion started by: cometboy
3 Replies

3. UNIX Desktop Questions & Answers

Help with Linux shell

Taking a class and having trouble with this whole section. 1. What is the name of the action the shell performs on your command-line after you hit the ENTER key (i.e., to cut your command-line syntax into its constituent tokens, including its commands, options and arguments)? Hint: It is a... (1 Reply)
Discussion started by: red20132014
1 Replies

4. Shell Programming and Scripting

Script Shell Linux

Hello, Please, how can I complete this script: Thank you (2 Replies)
Discussion started by: chercheur857
2 Replies

5. Homework & Coursework Questions

Linux Shell Script

Hi Guys I am new to Linux Shell Scripting . Can any one help me with this Task...files are attached for reference Task 1: write a script to generate a large size report file MX0002_new.XML by using the template MX0001_new.XML. Shell script is recomended, and it can run on Linux without... (2 Replies)
Discussion started by: samy_1811
2 Replies

6. Shell Programming and Scripting

Need help! Linux shell script

Hi all, I am trying to make a Nodemanager work in RHEL 5 I got this script from 'oraclemiddleware.wordpress.com', and made appropriate changes to suit my weblogic installation. I keep getting the error, "line 82: syntax error: unexpected end of file". I have checked every line to make sure all... (4 Replies)
Discussion started by: chakrv1
4 Replies

7. Shell Programming and Scripting

Shell programming in Linux

Hi, I have been working on Sun Solaris since a long time. Recently I got to work on RH Linux. My Linux version details are: Linux 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux I have a simple command in my shell script: export BKPTAG=`date... (3 Replies)
Discussion started by: sagarparadkar
3 Replies

8. Shell Programming and Scripting

Shell Scripting Linux

In shell Can I pass " to a program ? If not what is the work around ..? Can I define * as a wild card charecter that will return all the values from the files ..? I am trying to create a tool that will return the values from a property file . This tool has to support all the wild card... (1 Reply)
Discussion started by: app1sxv
1 Replies

9. Shell Programming and Scripting

help with linux shell script

HI im a novice with shell scripts but i need help with a random script I have this folder filled with 500 different file names... I need help creating a script that will take each filename and make a new folder named that filename and then move that file into the newly created folder. Then the... (1 Reply)
Discussion started by: emachala
1 Replies

10. UNIX for Dummies Questions & Answers

Linux Shell Question: how to print the shell script name ?

Suppose I have a script named "sc.sh" in the script how to print out its name "sc.sh"? (3 Replies)
Discussion started by: meili100
3 Replies
Login or Register to Ask a Question