Bash

3 Articles 0 Followers


[Bash] Returning from functions performatically

28 Sep 2022 1 minute read 0 comments rafaeldomi

So, once a while I posted some shell script tips. Now, let's see a little more, this time about functions and returning values. First, the basics Creating a function in bash is as simple like this: #!/bin/bash fnc_name() { echo "Inside the function...

About "sudo !!"

19 Feb 2022 1 minute read 1 comment R0bin

Recently I saw in a video how someone used the command sudo !! to execute the previous command with root rights.I've been using Linux for a long time, but irregularly, so I'm not familiar with all the tricks, and this one was definitely new to me. I...

Bash - Goto Shortcut for Fast Directory Change

12 Jan 2022 1 minute read 0 comments k88.io

If you spend any considerable time in your terminal, then there are certain directories that you go to more often than others. You may depend on your terminal autocomplete to quickly type cd ~/Documents  to and press up/down until you find the match....