DEV Community

Cover image for Some helpful Bash scripts I use daily

Some helpful Bash scripts I use daily

Avi Aryan on December 25, 2019

I posted a tweet about how investing time learning Bash scripting and various command-line tools is always worth it. Every time I learn a comman...
Collapse
 
kogans profile image
Stanislav Kogan

There is actually a nasty reason for this: thermal management in macbook pros is so bad, that sleep is often needed to prevent it from melting down.
Why would anybody spend money on this nasty platform is beyond me.

Collapse
 
aviaryan profile image
Avi Aryan • Edited

I have been looking to upgrade my machine but all the premium non-mac laptops (dell XPS 15, surface laptop, HP Spectre, Thinkpad x1 carbon) cost the same or more than the new MacBook Pro 16".

Which non-MacBook laptop would you recommend?

Also, I hear they fixed the thermal management in new 16'".

(talking about Indian prices here)

Collapse
 
thomasjunkos profile image
Thomas Junkツ

Thank you for the nice tips!

You should switch the to "Bash aliases" 😉

I love to alias the hell out of my terminal. Mostly two or three letter aliases

grh for git reset --hard HEAD

I hate typing 😂

Collapse
 
aviaryan profile image
Avi Aryan

I thought so too. But "scripts" sounds better. :-p

My favorite is ys for yarn start.

Collapse
 
thomasjunkos profile image
Thomas Junkツ

I like the way you are thinking 😉

Collapse
 
henrysabio profile image
Henry

I keep all my aliases in .bash_profile so all I need to do is type alias and it automatically responds back with a list of aliases I’ve made.

No need for an alias for my aliases.
But then again macOS runs the login shell .bash_profile by default every time.

So I guess this would indeed be useful and not so redundant for anyone who’s machine is setup differently.

Collapse
 
aviaryan profile image
Avi Aryan

It works for me too since I have source(d) that file into .bash_profile. But it lists everything and so finding my custom aliases will be a pain.

Collapse
 
kleene1 profile image
kleene1

I need to get back to using the cmd it would help with certain things.

Collapse
 
aviaryan profile image
Avi Aryan • Edited

100%. Let me know if you need help with anything. 😁

Collapse
 
aviaryan profile image
Avi Aryan

Yes. There are even neatly designed $10 menubar apps that do the same thing.

Collapse
 
tylerlwsmith profile image
Tyler Smith

These are awesome.

Collapse
 
kogans profile image
Stanislav Kogan

It's all nice and useful, but tget aren't scripts.

 
aviaryan profile image
Avi Aryan

Thanks. These certainly look rock-solid.

Collapse
 
shubhamshubhankar profile image
Shubham Subhankar Sharma

Really helpful scripts. Specially backup to dropbox and Kloc script.

Collapse
 
aviaryan profile image
Avi Aryan

Thanks. I was anxious why no one was talking about the Dropbox script.

It helps me avoid using solutions like TimeMachine and BackBlaze because all my important stuff is backed up every day.