Create an array and loop over it in bash

See the fallowing example. Note the use of () after +=. #!/bin/bash #Plugins: #AFC | #itsecurity | … #https://www.linuxjournal.com/content/bash-arrays UPDATEFILE=y if [ “$UPDATEFILE” = “y” ] then PLUGINARR=()...

Create multiple directories with LINUX mkdir -p

mkdir -p maindir/{assets/{css,js,img},src/{sass,types,img},dirX,dirY} Produces: The -p flag tells the mkdir command to create the main directory first if it doesn’t already exist (htg, in our case). The words in the brackets are part of the “brace expansion list”....

Automate WordPress Installation with scripts

Create the project directory and get the most recent version of WordPress PROJECT=”somesitedomaincom” # you can replace all occurrences of “~/Sites” with ${BASEPATH} BASEPATH=”some/path/to/dir” # Setup site folder, replace all...