![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 | |||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
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 |
|
||||
|
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
|
|
||||
|
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 |
|
||||
|
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...
|
|
||||
|
Quote:
Carl |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| bash, ksh, linux commands, shell, shell script, shell scripting, unix commands, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|