Author Topic: awk sucks and I hate it  (Read 5866 times)

0 Members and 1 Guest are viewing this topic.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8099
  • I speak for the entire clan (except Joe)
    • View Profile
awk sucks and I hate it
« on: April 20, 2008, 06:16:58 PM »
bash > awk
I hate awk so very much.

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7507
  • One for a Dime two for a Quarter!
    • View Profile
Re: awk sucks and I hate it
« Reply #1 on: April 20, 2008, 06:40:43 PM »
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8099
  • I speak for the entire clan (except Joe)
    • View Profile
Re: awk sucks and I hate it
« Reply #2 on: April 20, 2008, 09:47:36 PM »
Too bad Windows things are of no use to me in a Unix class.

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: awk sucks and I hate it
« Reply #3 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...
An adorable giant isopod!

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7507
  • One for a Dime two for a Quarter!
    • View Profile
Re: awk sucks and I hate it
« Reply #4 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.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17928
  • Fnord.
    • View Profile
    • SkullSecurity
Re: awk sucks and I hate it
« Reply #5 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.

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: awk sucks and I hate it
« Reply #6 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.
An adorable giant isopod!

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17928
  • Fnord.
    • View Profile
    • SkullSecurity
Re: awk sucks and I hate it
« Reply #7 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.

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: awk sucks and I hate it
« Reply #8 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.
« Last Edit: May 04, 2008, 06:30:34 AM by nslay »
An adorable giant isopod!

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: awk sucks and I hate it
« Reply #9 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.
An adorable giant isopod!

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17928
  • Fnord.
    • View Profile
    • SkullSecurity
Re: awk sucks and I hate it
« Reply #10 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.

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10326
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: awk sucks and I hate it
« Reply #11 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?
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Camel

  • Hero Member
  • *****
  • Posts: 1705
    • View Profile
    • BNU Bot
Re: awk sucks and I hate it
« Reply #12 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.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!