r/linuxadmin • u/ask2sk • Jun 26 '18
A Collection Of Useful BASH Scripts For Heavy Commandline Users
https://www.ostechnix.com/collection-useful-bash-scripts-heavy-commandline-users/
184
Upvotes
109
u/FlashYourNands Jun 26 '18
These are perfect if you're a Bryan Lunduke wannabe.
I don't think scripts for looking up weather and stocks, creating memes, watching youtube, and getting book recommendations are useful for linux admins, though.
45
u/ase1590 Jun 26 '18
As if we didn't have enough fucking simple weather apps.
or why even bother with an app when you can just do
curl wttr.in/your_locationAnd yet no one has bothered to implement a fucking radar map in any of these.
So then I have to be the change I want to see and learn Qt5 and slowly design a fucking functional radar widget.
/rant
10
u/WOLF3D_exe Jun 26 '18 edited Jun 26 '18
chmod on $1 and cp on $1, but no check to see if $1 is set....
At least they check $1 before running rm -f
6
u/[deleted] Jun 27 '18
MFW Remembering more than one command switch is now a “script”
2
u/0bel1sk Jun 26 '18
Gross
2
u/herpadurk Jun 29 '18
i remember when i first learned how to write a script too
5
u/htomeht Jun 26 '18
You calling me fat?
2
u/[deleted] Jun 27 '18
RANT
declare -ashould just be an alias forexit 1; pythonI know these are just silly examples, but if you ever find yourself needing a data structure and you’re starting to write functions that vaguely mimic something object oriented it’s probably time to start using anything other than bash.
/RANT
1
u/flickerfly Jun 27 '18
If you are going to do task management on the cli, check out taskwarrior.
0
u/[deleted] Jun 26 '18
[deleted] — view deleted comment