Clan x86

Technical (Development, Security, etc.) => Unix / Linux Discussion => Topic started by: rabbit on April 20, 2008, 06:16:58 pm

Title: awk sucks and I hate it
Post by: rabbit on April 20, 2008, 06:16:58 pm
bash > awk
I hate awk so very much.
Title: Re: awk sucks and I hate it
Post by: Warrior on April 20, 2008, 06:40:43 pm
powershell (http://blogs.msdn.com/powershell/archive/2006/04/25/comparative-examples-in-msh-and-ksh.aspx) > *
Title: Re: awk sucks and I hate it
Post by: rabbit on April 20, 2008, 09:47:36 pm
Too bad Windows things are of no use to me in a Unix class.
Title: Re: awk sucks and I hate it
Post by: nslay on April 27, 2008, 03:43:27 pm
bash > awk
I hate awk so very much.

sh > bash
I hate bash so very much.  It's not a good replacement for sh, and its marketed as "standard".  Then Linux kiddies write scripts that use it, breaking portability...somehow this reminds me of the very company Linux kiddies hate so much.  Irony indeed...
Title: Re: awk sucks and I hate it
Post by: Warrior on April 27, 2008, 04:11:11 pm
bash > awk
I hate awk so very much.

sh > bash
I hate bash so very much.  It's not a good replacement for sh, and its marketed as "standard".  Then Linux kiddies write scripts that use it, breaking portability...somehow this reminds me of the very company Linux kiddies hate so much.  Irony indeed...

porting bash is hard.
Title: Re: awk sucks and I hate it
Post by: iago on April 27, 2008, 05:28:30 pm
bash > awk
I hate awk so very much.

sh > bash
I hate bash so very much.  It's not a good replacement for sh, and its marketed as "standard".  Then Linux kiddies write scripts that use it, breaking portability...somehow this reminds me of the very company Linux kiddies hate so much.  Irony indeed...

What are the key differences? I've always found them inter-compatible.
Title: Re: awk sucks and I hate it
Post by: nslay on May 02, 2008, 08:23:08 pm
bash > awk
I hate awk so very much.

sh > bash
I hate bash so very much.  It's not a good replacement for sh, and its marketed as "standard".  Then Linux kiddies write scripts that use it, breaking portability...somehow this reminds me of the very company Linux kiddies hate so much.  Irony indeed...

What are the key differences? I've always found them inter-compatible.

bash is marketed as a replacement for sh, but it features more than just the basic bourne shell functionality...thats good and dandy except people are writing scripts for bash instead of sh, the POSIX standard.  In short, bash-specific scripts don't work with sh.
Title: Re: awk sucks and I hate it
Post by: iago on May 03, 2008, 03:10:18 am
What are the key differences? I've always found them inter-compatible.

bash is marketed as a replacement for sh, but it features more than just the basic bourne shell functionality...thats good and dandy except people are writing scripts for bash instead of sh, the POSIX standard.  In short, bash-specific scripts don't work with sh.
Great, which leads me to another question: What are the key differences? I've always found them inter-compatible.
Title: Re: awk sucks and I hate it
Post by: nslay on May 04, 2008, 06:28:56 am
What are the key differences? I've always found them inter-compatible.

bash is marketed as a replacement for sh, but it features more than just the basic bourne shell functionality...thats good and dandy except people are writing scripts for bash instead of sh, the POSIX standard.  In short, bash-specific scripts don't work with sh.
Great, which leads me to another question: What are the key differences? I've always found them inter-compatible.

Of course, bash can run sh scripts.  The converse is not true. 
How should I know?  I don't use bash!  You don't need to be a bash user to know that one isn't compatible with the other!

EDIT: Oh, and if you didn't know, sh in Linux is bash.  Maybe thats why you found them inter-compatible.
Title: Re: awk sucks and I hate it
Post by: nslay on May 04, 2008, 06:39:17 am
A great example:
http://en.wikipedia.org/wiki/Bash#Portability

Quote
Shell scripts written with Bash-specific features (bashisms) will not function on a system using the Bourne shell or one of its replacements, unless bash is installed as a secondary shell and the script begins with #!/bin/bash. This problem became particularly important when ubuntu began, in October 2006, to ship the Debian Almquist shell, dash, as the default scripting shell, causing a wide variety of scripts to fail.

Just so you know, dash and ash are both POSIX compliant.  And again, I reiterate that I hate bash because Linux kiddies don't realize that there is a standard and write bash-specific scripts.
Title: Re: awk sucks and I hate it
Post by: iago on May 04, 2008, 09:20:46 am
You aren't answering my question! I'm asking WHY they are different. WHAT is different about them? What will work in bash that doesn't work in sh?

Any script I've written seems to be cross compatible, so I'm curious where the differences lie.
Title: Re: awk sucks and I hate it
Post by: Joe on May 04, 2008, 06:11:30 pm
Perhaps I've been on Windows too long in the past, but what's wrong with just using bash? Does it leak memory or something, or is it just the UNIX philosophy of not having features that make the 10-mile uphill walk easier?
Title: Re: awk sucks and I hate it
Post by: Camel on May 12, 2008, 10:29:01 pm
Perhaps I've been on Windows too long in the past, but what's wrong with just using bash? Does it leak memory or something, or is it just the UNIX philosophy of not having features that make the 10-mile uphill walk easier?

porting bash is hard.