Tag: bash
This post shows you 3 interesting/fun BASH commands: BASH Console Tetris Game You can now play tetris game in Bash console. You would need to install this via: $ …
Sometimes we want to repeat a command on Linux, and we can use the following BASH function to repeat a command for a number of times: function repeat() { …
How to Check if a Domain can be Ping-able? Creating a bash script to check if a domain is reachable via ping can be very useful for basic network …
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 …
On Linux, we can cat the file “/proc/meminfo” to display memory related information: $ cat /proc/memoinfo MemTotal: 32939372 kB MemFree: 31155452 kB MemAvailable: 31269760 kB Buffers: 242964 kB Cached: …