Shell Script to execute a command on every line of a file
There are many times, where you want to execute the same command every line of a file, it can be simple printing on the screen or some other manipulation. This simple shell script reads a file line by line and executes the command specified by the user on the line. As you can see that [...]
Shell Script to extract various sections of a Man page
A Man page has various sections like NAME SYNOPSIS DESCRIPTION EXAMPLE AUTHORS The above are some of the few sections to name for. You open a man page using the command man. It can also be redirected to a file. Let’s see the script As you can see that it takes three arguments, The Man [...]
How to install zsh in Ubuntu
Bash is the commonly used shell. ksh and csh are the other shells. Zsh or the Z shell can also be used to execute commands. To install zsh in Ubuntu Start working with zsh by entering zsh on the current shell
How to install ksh in Ubuntu?
Like Bash and csh, ksh is also a shell available in almost all Linux/Unix variants. Ksh is KornShell. Like Bash, the most commonly used shell, ksh is also used to enter and execute commands To install ksh in Ubuntu To start working with ksh Enter the commands at the ksh prompt
How to install csh in Ubuntu?
You may have worked with the Terminal a number of times and if you are a command line enthusiast, you may have definitely heard about bash. bash is a command language interpreter. It is an acronym for Bourne again Shell. Like bash, there are plenty of other shells, one of which is csh. It’s a [...]
apt-get: Shell Script to remove the packages mentioned in a File
Check this simple shell script which reads all the packages mentioned in a file and removes them one by one. To use this script, mention the packages to be removed in a file. Take for example, pkgs.txt contains the files to be removed To execute the above script, It will remove all the packages one [...]
Shell script to find the length of a string
awk has a built in function called length with which you can find the length of a string. The following shell script shows how to find the length of the string with awk On executing the program You can even find the length from the terminal with this simple command or Thus you can see [...]