once again trying to remember why one would use [ vs [[ in bash
-
Show this thread
-
Replying to @mountain_ghosts
Only reason I know is [ for POSIX compliance, while [[ is specific to bash and others.
1 reply 0 retweets 1 like -
Replying to @yoshuawuyts @mountain_ghosts
yeah. this. don’t fuck with unportable bash-isms, why would you do that. O_O
1 reply 0 retweets 0 likes -
Replying to @ELLIOTTCABLE @mountain_ghosts
In case my previous tweet is interpreted as a discouragement to use bash's extensions, I want to go on record that I don't share that position.
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts @mountain_ghosts
ah, then I misread, and mistook you for a reasonable person. :P
1 reply 0 retweets 0 likes -
in seriousness, though, if not vast portability, why write complex programs in sh? I’ve always been confused by people who use *bash*, if they’re going to discard some portability for sanity. I’d either write portable sh … or, preferably, just upgrade to Ruby or w/e.
1 reply 0 retweets 1 like
I feel bash excels at hot gluing utilities together, mostly for personal use. It provides many conveniences for that purpose that POSIX sh lacks. If I anticipate portability or longevity requirements of any kind I'd directly reach for Rust or Node.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.