Bash: using positional parameter
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:…
Simply Explaining Technology
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.…
locate command can be used to search for files. Locate command is good at search an index but not great at listing the results. To get better listing features, you…
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
Suppose I need to change the file extensions of certain files in a directory. The directory address specified by the user is read into the script in line 2. This…
Finding files on unix and linux Find is an extremely useful command for finding files. It searches based a specified condition at a specified directory and descends into all subdirectories…
The following script merges several files into one file. Line 5 creates a sorted list of directory contents. Line six loops through all files with .fasta extension. Line 8 appends…