How to automate your start of day as a developer with Bash?

Prajwal Bati
2 min readFeb 16, 2023

--

As a developer, when you sit down at your desk to start your regular work day, you will obviously open a few applications. It may be the browser and a few links like Gmail, Facebook, LinkedIn, GitHub, or skype. You will open all these apps one by one for your use.

So why not automate these things with a single script so that you do not need to open them one by one? So let's learn it now. This guide is for mac users and of course, there are also ways to automate these things in other OS platforms.

  1. You need to create a file and let’s name it as letstart.sh .
  2. You can place this file at any location you want.
  3. Now add commands in the file as:
    open -a “Skype.app”
    Above line will open skype.
  4. Similarly, you can add commands in the next line to open other applications like:
    open -a “Notes.app”
    open -a “Visual Studio Code.app” work
    open -a “Google Chrome.app”
    https://www.facebook.com/ https://mail.google.com/mail/u/0/#inbox
  5. You can open a folder in VS code directly by placing the folder name as used in the above example.
  6. You can also open the browser and links by placing links as used in the above example.
  7. Once you are done, save the file.
  8. Now you can open your terminal and navigate to the file’s location and type the following command to execute your script.
    ./letstart.sh
  9. You can also add an alias command in your .bashrc file so that you do not have to navigate to the folder and type the filename to run it.
  10. Open your .bashrc file. Usually, it should be at the root.
    nano ~/.bashrc
  11. Now add the following line in your .bashrc file.
    alias letstart=”cd pathofthefile && ./letstart.sh”
  12. Now every time you need to run the script, you can open the terminal and type letstart . All the apps you mentioned in the file will open one by one.

Enjoy your day.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Prajwal Bati
Prajwal Bati

Written by Prajwal Bati

Full Stack | MERN | MEAN | Blockchain | Javascript

No responses yet

Write a response