The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
simple shell - how to get a parameter typed in a shell script cmitulescu Shell Programming and Scripting 4 01-09-2009 08:45 PM
Linux Shell Question: how to print the shell script name ? meili100 UNIX for Dummies Questions & Answers 3 07-01-2008 01:55 PM
How to Start a Shell as Login shell instead of ordinary shell Sivaswami Linux 3 07-01-2008 01:52 PM
Difference between writing Unix Shell script and AIX Shell Scripts haroonec AIX 0 04-12-2006 02:27 AM
how to convert from korn shell to normal shell with this code? forevercalz Shell Programming and Scripting 21 11-23-2005 02:18 AM

View Poll Results: What's your most useful shell?
/bin/sh 61 8.62%
/bin/csh 34 4.80%
/bin/ksh 295 41.67%
/bin/tcsh 33 4.66%
/bin/bash 285 40.25%
Voters: 708. You may not vote on this poll

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 6 votes, 4.33 average. Display Modes
  #43 (permalink)  
Old 07-03-2006
Freddie Freddie is offline
Registered User
  
 

Join Date: Jun 2006
Location: Poland, Warsaw
Posts: 8
Question

Now, I'm new to GNU/Linux, I'm just learning it.
I only know that 'ksh' stands for 'korn shell' . Nothing more.
So I've olny used Bash.

I can't say if Bash is better than Ksh or viceversa, I didn't try both them.


Freddie
  #44 (permalink)  
Old 07-04-2006
Hitori's Avatar
Hitori Hitori is offline Forum Advisor  
Registered User
  
 

Join Date: Jun 2006
Posts: 360
definitely bash (simple for simple tasks, for advanced tasks use some programming language like perl)
  #45 (permalink)  
Old 07-17-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,928
bash. It lets you group things in useful ways some don't realize. You can redirect the output of not just individual programs, but entire loops.

Code:
for ((N=0; N<10; N++))
do
    echo "This is line ${N}"
done > lines.txt
  #46 (permalink)  
Old 07-26-2006
phrazz phrazz is offline
Registered User
  
 

Join Date: Jul 2006
Location: Alexandria, VA
Posts: 8
KornShell/BASH/perl rule, others drool

Ya know when you ask "most useful", it brings up the YMMV disclaimers. Anyhow, I've been programming shells for a couple dozen years or so and I've used all of the ones listed and about that many more. You can write programs in all the shells, but you'll have the best durability and portability by sticking with Bourne-flavored shells (KornShell, BASH and Bourne if you're hard-core).

Shell comparisons get "religious" and UNIX bigots like me are always going to emphasize why the other shells suck. So, my disdain of the C Shell may be a little overblown, but it's based on many years of trying to work around limitations of C Shell that don't exist on KornShell (et al.).

BASH is becoming more ubiquitious (since it's the standard on Linux), but KornShell is now a standard on AIX, Solaris, HP/UX, and most other major UNIX flavors. BASH is slightly more feature-laden than Kornshell, but at a certain point when you get really tricky, you'll want to use Perl (fancy data structures, infinite variety of modules, more powerful parser and definitely better performance for complex algorithms).

One of the most infamous treatises on shell flavor comparisons is by the illustrious Tom Christiansen. This is somewhat outdated, but really fun to read:

http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

Anyhow, many of these problems are fixed in T Shell, Z Shell and Whatever Shell, but the point is if you want a standard shell, stick with POSIX (ie KornShell). Anyways, Real programmers use perl.

If you go the KornShell route, pick up "The New KornShell Command and Programming Language (by Bolsky & Korn). If you're running Linux, keep it easy and start with BASH (various O'Reilly books on shells are superb also).

-Phrazz
  #47 (permalink)  
Old 08-08-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,928
I'd love perl if it wasn't so resource intensive. I wrote an awesome Perl/MySQL script for a web inventory, then watched them install and use it on their server -- which turned out to be a P133 with 128MB RAM... ugh...
  #48 (permalink)  
Old 08-10-2006
khmerkid khmerkid is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 1
Cool hi

hi wat r good
  #49 (permalink)  
Old 08-24-2006
BOFH BOFH is offline Forum Advisor  
Registered User
  
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 406
Quote:
Originally Posted by buffoonix
How come so many prefer the Korn shell?

What I don't like about it is that it's proprietary
though by now I think there is a public domain ksh available.
Even though it's proprietary, it comes with the unixes I'm used to using, Solaris primarily. It becomes a proprietary issue when someone's using it on something like linux so they have to come up with bash instead. A perfectly good shell of course.

Carl
Sponsored Links
Reply

Bookmarks

Tags
bash, ksh, linux commands, shell, shell script, shell scripting, unix commands, unix scripting, unix scripting basics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:46 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0