by doitwithcode | Jan 20, 2020 | Bash, Blog, Linux
Suppose you have a variable below how would you increment that variable by 1 in Bash x=0 You can use let x++ If we want to loop through a number of items while incrementing the x variable, we can use the for loop below: for name in Lisa Lilly Lousa ; do echo $x $name...
by doitwithcode | Dec 10, 2019 | Bash, Blog, Python
In a previous blog post, we mass cropped images using a for loop in Bash. After cropping all of those images, I faced another challenge which is to have an easy way to view all the cropped images in one file instead of trying to go through 200 different files. The...
by doitwithcode | Dec 9, 2019 | Bash, Blog
Most Linux distributions and also Mac OS has ImageMagick installed. If however, it is not installed, you can follow the instructions at https://imagemagick.org/script/download.php ( including Windows ) To crop an image, you can simply use the command below: convert...
by doitwithcode | Oct 4, 2019 | Bash, Blog
Most Bash prompts are configured in the format user@host <working directory>$ but did you know you can customize it? The value of the Bash prompt is contained in the environmental variable $PS1. For instance, on a CentOS server I’m working on $PS1 is...