Bash Programming
-
Sourcing With Bash
Generally, to run a bash program or script you need to add a permission bit, which makes the program or script executable and you then run it whenever you like, the thing is when execution starts, a
-
Suppressing Sensitive Entered Text/String In Bash
So far in our examples or scripts, we have written in the previous guides, we have no way of controlling what is visible to user, which is fine if we have no sensitive data such as passwords. As soon
-
Limiting The Number of Entered Characters In read prompt
We previously looked at the way we could utilize the read prompts in bash, here is the script we wrote in out last guide: #!/bin/bash read -p "What is Your Name? " name echo "Your Name is $name" exit
-
Working With Variables In Bash
A variable is a value that can change depending on conditions or data passed to the program. To work with the variable in bash, here are what you need to know: A variable name cannot start with a nu
-
Pipes and Redirection in Bash
Piping is the process where the result of one command is sent or pipe (redirect) into another command. A good example of this is piping the output of ls command into wc (count) for counting the numbe
-
Create Multiple Files at Once Using Brace Expansion in BASH
Chances are you've come across expansions in BASH, whenever you are going back to the user home directory, we use the cd command alongside a tilde character (~), e.g: cd ~ This would take you back to
-
Using read in a Bash Script
We previously looked at using echo with options in a shell, in this guide we would combine it with read command to prompt for user input. Create and open up a new text file: nano $HOME/bin/hw3.sh Ad
-
Adding Comment To a Script
In shell scripting, a comment is a readable explanation in a script that is ignored by the interpreter, you can either add a comment about what the script does or you can write a comment about what a
-
Using echo with Options in a Shell (With Examples)
The echo command is one of the most used shell built-in command, and as you have probably guessed, it is used to print a line of text to standard output (the screen). It sends a copy of an input sign
-
Properly Naming a Bash Scripts
Last week, I wrote a basic intro on bash shell scripting in this guide, we would take a look at how to name a script properly. Let's get this straight, we mostly do name things abruptly in the real
-
Getting Started With Bash (Introduction)
This is my first post on bash scripting, and I decided to delve into bash scripting because I am tired of doing repetitive tasks manually. So, if you ask me why use bash? My answer would be, if you w
-
How To Find Out Who Is Logged In On a GNU/Linux Server
Sometimes you just want to find out the bugged logged into your system ;), It might be your co-worker or friends. To find out who is logged in including the time they logged in, you can use the whoc