Yet another reason to love Solaris



  • Where "love" really means "hate":

    I was trying to show the five or so lines following a grepped string in source files just for context ... but the Solaris grep can't handle it so you must whip out nawk, apparently. Or write a perl script.


  • Winner of the 2016 Presidential Election

    @zelmak said:

    Filed under: I Hate Oracle

    Join the club.



  • @zelmak said:

    Where "love" really means "hate":

    I was trying to show the five or so lines following a grepped string in source files just for context ... but the Solaris grep can't handle it so you must whip out nawk, apparently. Or write a perl script.

    I just installed GNU Coreutils alongside the Solaris ones and went on with my life.



  • Solaris are still rocking it with the 90's era user land, I see. Does Solaris tar support the -z flag yet?



  • @zelmak said:

    Where "love" really means "hate":

    I was trying to show the five or so lines following a grepped string in source files just for context ... but the Solaris grep can't handle it so you must whip out nawk, apparently. Or write a perl script.

    Solaris is so broken, it won't allow people to put actual links in their posts.



  • @Ronald said:

    @zelmak said:
    Where "love" really means "hate":

    I was trying to show the five or so lines following a grepped string in source files just for context ... but the Solaris grep can't handle it so you must whip out nawk, apparently. Or write a perl script.

    Solaris is so broken, it won't allow people to put actual links in their posts.



  • So now you're complaining that Solaris doesn't use the GNU set of tools? It comes with its standard set of commands, that comply with an older "standard" than GNU. GNU has just added extra flags and alternative ways of writing them (such as "--verbose" vs "-v").

    And if this is a problem, you just install the GNU tools, which Sun happily supplies to you.

    A more basic problem with the GNU tools as you find them in Linux is that /bin/sh is not the Bourne Shell, but bash (Bourne Again Shell) instead. Which makes people write scripts that have #!/bin/sh as their first line, but are in fact bash scripts. Very nice (not) for portability, for example if you transfer a script to Solaris.

    Oh wait, I forgot, it's all Solaris' fault. Right.



  • @Severity One said:

    A more basic problem with the GNU tools as you find them in Linux is that /bin/sh is not the Bourne Shell, but bash (Bourne Again Shell) instead.

    This is very much distro-specific.

    @Severity One said:

    Oh wait, I forgot, it's all Solaris' fault. Right.

    No, it's the fault of whoever wrote the shell scripts. Of course, changing the "sh" to "bash" is a really difficult fix, too.



  • @Severity One said:

    Very nice (not) for portability, for example if you transfer a script to Solaris.
     

    Sun have struggled to understand the bash. They've got .bashrc and .bash_profile completely around the wrong way.

    @morbiuswilters said:

    Of course, changing the "sh" to "bash" is a really difficult fix, too

    I think the point wasn't changing it from /bin/sh to /bin/bash, more the other way around: if you set the context to /bin/sh to use the Bourne shell, some Linux distros will use the Bash instead.



  • @Cassidy said:

    ...if you set the context to /bin/sh to use the Bourne shell, some Linux distros will use the Bash instead.

    Why would that be a problem? Bash should run Bourne scripts just fine.



  • @morbiuswilters said:

    Why would that be a problem? Bash should run Bourne scripts just fine.
     

    I thought that, but some Bourne stuff that I ported between AIX, HP-UX, SCO, Solaris and OpenSewer required some minor tweaks to work under Linux (specifically DeadRat then SuSE) when running it in Bash. I can't remember specifically; I think it was some conditions and parentheses that caused Bash to strop off since it was expecting some newer syntax and scoffed at such antiquated terms ("enable" was another that caught me out).

    I know of a client that had an issue the other way around - they were writing scripts on a Linux desktop which didn't work on SlowLoris, finally twigging that (newer) Bash constructs don't work in the Bourne, despite trying it out in /bin/sh on Linux.

    Ether way, it was minor trivial shit that was irritating at the time but only for a short while. Served to remind me that Linux wasn't as mature as it was made out to be and some of this amateur/enthusiast-driven stuff contains gotchas.



  • @Cassidy said:

    SlowLoris

    I've always wondered: Where are all of the fast Lorises?



  • @Cassidy said:

    Ether way, it was minor trivial shit that was irritating at the time but only for a short while.
    Like Larry Wall said, it's easier to port a shell than a shell script.



  • @morbiuswilters said:

    @Cassidy said:
    SlowLoris

    I've always wondered: Where are all of the fast Lorises?

     

    They got away.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.