bash shell scripting
A shell script is a code (script) written for the shell or command line interpreter of an operating system such as Unix. It allows users to automate tasks which would…
Simply Explaining Technology
A shell script is a code (script) written for the shell or command line interpreter of an operating system such as Unix. It allows users to automate tasks which would…
The following code reads files in a directory called SQL. Then if runs an SQL command with the file name as input. Finally, it deletes the file from the directory.
Recently, I found a really elegant solution to display a file tree using the ls command. I like is so much that I feel the need to share it. The…
A parameter is an entity that stores value and is available to a program. There are many system variables available to BASH. They could be retrieved easily by prefixing a…
Positional parameters are used to pass arguments to a command line application. This post shows you how to used positional parameter in bash. On your terminal, type the following command:…
For loops in bash a similar to commonly used languages such as Perl and C. bash loops do not use curly brackets for body demarcation. Example 1 Loop start from…
In bash, you can use the backslash character (“\”) to escape any character. However, if a single quote is inside single quotes, it cannot be escaped with a backslash character.…
The following bash script shows how to capture image properties from ImageMagick: xa.jpg is an image which is stored in the same directory as this script. identify is an ImageMagick…
Error Cause rm can only handle a certain number of arguments. If you run following command in a directory of 500 json files, the argument list is 500 Solution Use…
The following code read the contents of a text file To read first five lines only Read five lines and then delete those lines