Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ddephor44465yShellscripts are unreadable anyway, the syntax is inconsistent and unintuitive.
Ok, most of it originates from 1856 or maybe already 1789, but I don't understand why it hasn't evolved to something read- and usable over the last 2 decades.
If possible, I would try to switch to python or some other scripting language with usable syntax. -
ddephor44465y@JustThat Yes, sure, 'if [ -z "$var" ]' is readable AF. Really intuitive.
How many here know what that does without looking it up? -
@JustThat TBH I'm more frustrated with how complicated strings are in bash. I just learned that ' " and ${} all represents strings but in different ways
' being a string literal
" being a format string
${} being a format string with slightly different escape characters than "
And right now I may have one of these in my string and can't easily figure out with an echo if there is one in it. -
Who the fuck uses dots in bash variable names and then complains about undef behaviour?
Which experimental bash option have you set to even allow this kind of fuckery..??? -
If these are not bash vars I see in the shot [why tf would you show them then?!?], sanitize your fucking output by removing your fucking carriage fucking windows' returns!
Fuck! Idk why I am swearing. Guess I've caught cold. And maybe the fact that I was nearly killed twice today in Latvia. FUCK!!
FUCK!!
P.S. If you're aiming to your foot and pulling the trigger then do not blaim the shotgun -
@JustThat just doublequote your variables everywhere and you'll prevent 98% of undef behavior
Related Rants
What the absolute fuck is this!
Fucking bash needs to get its shit together with its fucking strings.
I don't fucking know why str1 + var2 = var2tr1
Like who designed this fucking bullshit!
I've spent the past 8 hours today counting all my ' and " and making sure everything is getting passed correctly.
And how do you even google this shit anyways!
And why the fuck is the official suggestion from the bash FAQ to load everything into an array and to call it with "${ARRAY[@]}"
WHO THE FUCK DECIDED THAT WAS READABLE!!
AUGH!!!
In case anyone was wondering. It didn't work anyways.
I think I'm done for today... I can't anymore...
for anyone wondering. This is bash getting executed by nodejs with execSync()
and those tokens are temporary and only exist on my dev machine. Sorry for getting your hopes up.
rant
strings
bash
bullshit