This will be the last article I do on bash scripting for now. I want to shift gears for a few and explore some other languages. This project is called 'rmspaces'. It's another simple little program created with bash and Bashly for removing the spaces in filenames. It's super simple and does something super simple but useful. Yet, as simple as it may have seemed, I actually had a little trouble building this one that I will get into soon. Just as with the last two articles, I used Bashly to generate the finished script. The following bit I was able to re-use from the previous script. It checks for input being piped or redirected to stdin and if that is empty then it will parse the command line and separate multiple files passed as a comma separated list or a single item and assigns it to an array: The meat of the work is the part after that where the script splits the filename from its extension then after changing that string puts it back together with the modified ...
I enjoyed the srcset project so much that I want to create a set of scripts for creating and managing my projects. In recent Linux news it's been said that the home directory will have a Projects folder by default. I have always created this folder anyway and the scripts I will be creating assume this path exists or will create it if it doesn't. This post will spotlight the new-website command. Just as with the last article, I used Bashly to generate the finished script. To recap what I said in the first part of this series, I aim for my scripts to follow some basic guidelines when possible and ideal: a command does one thing and does it well a command should be able to accept data from pipe The new-website script, like the previous srcset project, is simple. I bounce back and forth between different project directory structures for websites and I am aiming to try and stick to one convention and have some uniformity (writing this I am thinking of changing it already in the ...