Linked by Thom Holwerda on Wed 21st Feb 2007 22:36 UTC, submitted by IdaAshley
General Development "Are you confused by the plethora of testing and comparison options in the Bash shell? This tip helps you demystify the various types of file, arithmetic, and string tests so you will always know when to use test, [ ], [[ ]], (( )), or if-then-else constructs."
Order by: Score:
There isn't jack about linux in the article
by Sphinx on Wed 21st Feb 2007 23:48 UTC
Sphinx
Member since:
2005-07-09

Why not, "Demystify AIX Bash Test and Comparison Functions". Oh wait that's not a big enough buzzword. A pathetic move to attract readers compared to creative writing with a title reflecting the content

Reply Score: 2

fsckit Member since:
2006-09-24

Err isn't that a given, being that Linux is the only system that comes with or defaults to, the POS known as bash?

Reply Score: 1

Redeeman Member since:
2006-03-23

Wow! this is really new knowledge to me, how is it that linux defaults to bash? downloading linux doesent seem to reveal any defaulting to bash. I cant seem to find the place where its bundled? perhaps you can enlighten me.

and now on to what you really say. Bash really isnt that bad, its quite fast, runs on lots of systems, and its easy to use.

nevertheless, it simply isnt zsh ;)

Reply Score: 2

Michael Member since:
2005-07-01

how is it that linux defaults to bash?

Red Hat, SUSE, Debian, Ubuntu, Mandriva and Slackware all default to bash.

When people say Linux, they usually mean one or more of those operating systems, and/or their derivatives. It's technically wrong, but the technically right phrase is impractically long and context nearly always disambiguates the term.

Sometimes people say something about "Linux" that is true of one or two of those OSs, but not of the others and that _is_ irritating. But that's life.

Edited 2007-02-22 01:48

Reply Score: 3

Redeeman Member since:
2006-03-23

you mean the impratically long sentences like "popular linux distributions", "most linux dists" and the like?

Reply Score: 4

fsckit Member since:
2006-09-24

My apologies. I suppose I should have said "The myriad of operating systems that consist of a linux kernel and gnu+bsd+other userland which have been rolled into specific distributions". FFS stop playing RMS, you know damn well what I meant. Personally I will not use any other shell but tcsh for a login, and scripting belongs to sh/ksh. Bash is way too buggy, bloated, and incompatible with everything for my tastes.

Reply Score: 3

Lobotomik Member since:
2006-01-03

Wow! You blind me with your science! Really, it will be difficult to enlighten someone who already shines so brightly.

I thought that the fact that 98% of the distros default to bash would reveal some defaulting quite clearly, and that the place where it is usually bundled is /bin/bash.

However, you have opened my eyes to the blinding fact that there is always some weirdo running his very own configuration of Linux from Scratch, who does things otherwise, and who will be very deeply offended if for a moment he is patronisingly put in the stinking pile of those who go with the flow.

I feel enlightened. I will go to bed feeling so much wiser!

Reply Score: 2

butters Member since:
2005-07-08

POS compared to what? csh and tcsh are a compatibility nightmare and not much easier to script in than bash. ksh is possibly a little better for scripting than bash in some respects, but worse in others, and not even close as an interactive shell. Yeah, zsh is pretty good, probably better than bash in most respects. But there are plenty of extensions that give bash most of zsh's advanced features.

In my mind, the minute a task becomes too complex to be manageable with bash/ksh, I reach for Python.

Reply Score: 5

samad Member since:
2006-03-31

It would be cool if there was a shell that was basically a python interpreter but with added shell functionality like executing commands in $PATH or piping without any added syntax. (Executing and piping in python is a lot more complicated than a standard shell.)

Reply Score: 1

butters Member since:
2005-07-08

I've got just what you're looking for:

http://ipython.scipy.org/moin/

I think you'll be quite pleased.

Reply Score: 5

Tyr. Member since:
2005-07-06

Err isn't that a given, being that Linux is the only system that comes with or defaults to, the POS known as bash?

OsX also comes with bash, and it is in fact the default. Luckily it also comes with ksh. Just fyi.

I don't get the OP's gripe, the article clearly states : "The Bash shell is available on many Linux® and UNIX® systems today, and is a common default shell on Linux." Hence the article is featured in IBM's Linux tips section. Nothing out of the ordinary since IBM actually offer Linux on P-series as an option.

Edited 2007-02-22 06:18

Reply Score: 3

butters Member since:
2005-07-08

It's because AIX has a very high degree of "Linux affinity." That's why it's called AIX 5L. The L stands for Linux. BTW, I'm not kidding.

Modern System P servers (AIX 5L 5.3 on POWER5) consist of multiple virtual machines called LPARs that may be configured dynamically at runtime. LPAR configuration is done through an interface called the Hardware Management Console (HMC), which is a commodity PC running Linux and attached to any number of System P servers via Ethernet. So you can't run AIX these days without running Linux as well.

Reply Score: 5

another great bash resource
by butters on Thu 22nd Feb 2007 01:23 UTC
butters
Member since:
2005-07-08

I always keep this bookmarked, even though I know most of it by heart:

http://tldp.org/LDP/abs/html/refcards.html

Reply Score: 5

RE: another great bash resource
by gnemmi on Thu 22nd Feb 2007 14:16 UTC in reply to "another great bash resource"
gnemmi Member since:
2006-08-17

yeahh !! thanks for sharing !! I doesn't really know how much you know, stuff like this ALWAYS comes in handy ..
thank you !

Reply Score: 1

tip of the bashberg
by moleskine on Thu 22nd Feb 2007 11:14 UTC
moleskine
Member since:
2005-11-05

Just my 2 cents, but I find these IBM articles quite helpful. There is a full list of their tutorials here: http://www-128.ibm.com/ developerworks/views/linux/libraryview.jsp?type_by=Tutorials

They seem to be all about "programming for non-programmers". An awful lot of folks must fall into this category. For someone like me, it's a great way to create nifty bash one-liners covering a range of simple tasks that I can then put in my .bashrc and alias into single words.

I have the O'Reilly guide to bash, but sometimes a short article on a single subject sticks in the mind and is more helpful.

Those who want to use other shells will surely find several others ready-packaged with their Linux distro? Some are even rumoured to add bright red go-faster stripes to every post you subsequently make to a web forum.

Reply Score: 2

Great Linux administration guides from IBM!
by usr0 on Thu 22nd Feb 2007 13:14 UTC
usr0
Member since:
2006-10-27

This series of Linux administration guides from IBM published on OSNews recently is definitely worth to be bookmarked. These tutorials are *goal oriented* and the authors do not simply copy and paste the manual content like a few other sites.

The tutorials explain the functionality of useful Linux commands by solving substantial tasks and problems that are very common in Unix environments.

These are just two other nice IBM tutorials being published on OSNews:

http://www-128.ibm.com/developerworks/aix/library/au-satopenssh.htm...
(i.a.: how to login via ssh on frequently used hosts without providing a password)

http://www-128.ibm.com/developerworks/aix/library/au-speakingunix7....
(i.a.: how to search directories for a certain string)

Reply Score: 2