Korn vs. Bash - which to use


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Korn vs. Bash - which to use
# 1  
Old 04-16-2009
Korn vs. Bash - which to use

Hello:

I'm a newbie to Unix/Linus and shell scripting.

This is probably a stupid question but here goes.

Some people at work use Korn for scripting while others use Bash. What is the difference between the two? If the two is better to use?

When a person logs in, one will type bash at the prompt and another would type ksh. I noticed that the behavior of the command line is different between the two.

I would like to learn one of these but I'm not sure which is the best one to learn.

Can someone give me some insight into all of this?

Thanks.
# 2  
Old 04-16-2009
i like ksh. bash has the csh history mechanism but the scripting language looks like ksh.

since the command overlap for each is about 97%, you can't go wrong either way, methinks.
# 3  
Old 04-16-2009
Any suggestions on good books for beginners?
# 4  
Old 04-16-2009
One plus for BASH is it has the advanced bash scripting guide, regularly updated and full of intros and examples and cheat sheets.

Recent versions of bash have some really useful extra features, like full-blown regular expressions. But ksh has some things bash doesn't, like floating-point numbers.

I tend to find bash preinstalled a lot more often than I see ksh preinstalled.
# 5  
Old 04-16-2009
I kindly suggest you purchase this written book by our popular forum member, cfajohnson:

Shell Scripting Recipes - Links

If you have any questions about the book, I am sure Chris does not mind if you ask them here Smilie
# 6  
Old 04-16-2009
Thank you for the book recommendation. Does his book cover Bash, Korn or something different? I read the intro and it mentions POSIX shell. What is that?
# 7  
Old 04-17-2009
Not an actual shell, it's a set of features a shell has to implement to be considered POSIX-compliant, mostly from the ancient Bourne shell. I believe BASH and KSH are both posix compliant, but they add a lot more features as well.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX Korn Shell to Linux Bash

Migrating Unix batch jobs (Korn Shell) running in HP-UX server to Linux environment. Hi All Please help me to understand the easiest way to migrate Kernel Shell scripts to Linux Bash. Also let me know 1. Any automated scripts or tools available for this. 2. Challenges and issues... (5 Replies)
Discussion started by: cpremesh
5 Replies

2. Shell Programming and Scripting

New to korn shell

I am new to korn shell and slowly learning. Is there a way to have a parent script prompt for input and then execute a child script and return the output then move forward and ask for more input and then execute the next child script? I think the answer is no but thought i would ask. (2 Replies)
Discussion started by: cptkirkh
2 Replies

3. Shell Programming and Scripting

Difficulty with a couple commands porting from korn shell to bash

I am relatively new to shell scripting. I have a script I wrote that works fine in korn shell. I need to make it work in bash on a different server. There are a couple valid korn shell commands I am having difficulty finding the bash equivalents for. At one point the scripts prompts the... (5 Replies)
Discussion started by: inakajin
5 Replies

4. Shell Programming and Scripting

help with korn script

Hi guys, I am new to unix scripting. I have a folder rx and it has subfolders rx1,rx2 and rx3 each subfolder has 4 directories each load,land,arch and extr I have the below tar and rm commands using wich we should write a shell script rx1-- tar -cf... (2 Replies)
Discussion started by: Kornscript
2 Replies

5. Shell Programming and Scripting

Korn/bash Script to monitor a file a check for specific data

Hi, Im trying to write this script but im stuck on it, basicaly what i want to do is to write a code to verify a log file ( apache log file for example ) and for each new line with specific data , then, output this new line for another file: full ex: output of the server.log is (... (4 Replies)
Discussion started by: Thales.Claro
4 Replies

6. Shell Programming and Scripting

korn shell

I am using korn shell but I want to have my prompt to represnent that of my C shell because I like it better. Is there anyway to do this? (1 Reply)
Discussion started by: vthokiefan
1 Replies

7. UNIX for Dummies Questions & Answers

korn shell to bash - statement not working

Everything else seems to be working, but this isn't. Is it the "cat..." that is wrong of the condition? Thanks. cat tc_result.txt | while read LINE do if then let "files_run += 1"; echo "inside the if loop" # save current filetype case $LINE... (5 Replies)
Discussion started by: brdholman
5 Replies

8. Shell Programming and Scripting

Korn Shell

Hi I am new to shell programming. I need help to write a script to monitor a process on Sun OS. If the process fails then call a oracle procedure. i check the process if running by typing ps -ef | grep ESP | grep -v grep root 29002 1 0 Mar 18 ? 7:20... (4 Replies)
Discussion started by: gpanesar
4 Replies

9. Shell Programming and Scripting

korn syntax

Hi, how do I write this condition in korn shell: file="*.html" if then echo "$file" fi I am trying to find all html files from a input text file that were created today and ftp them to a different server. please help. (1 Reply)
Discussion started by: sajjad02
1 Replies

10. UNIX for Dummies Questions & Answers

Korn vs Bash

Let's say I have alias good_op=`]` in a Korn shell script. How can I write that in a non-interactive bash shell? (5 Replies)
Discussion started by: jpprial
5 Replies
Login or Register to Ask a Question