Category: batch script
To check the HTTP response code after running a curl command, you can use the -w option with curl, which allows you to specify a custom output format. Here’s …
The MOV video files are generally huge compare to MP4/MPEG. When taking a video using smart phones such as iphone 12 Pro Max, you get the MOV videos. Then …
We can compute the Greatest Common Divisor (GCD) using Iterative Divide/Remainder Method. The following is the GCD implementation in BASH Programming: #!/bin/bash function gcd() { local x=$1 local y=$2 …
The str_repeat function is a commonly used function that allows you to print/generate a string that is filled with a number of common patterns. For example: str_repeat(3, “Hello “) …
In Linux, we have service process controller which can be used to start, stop and restart a particular registered service. For example: $ sudo service mysql stop $ sudo …