Difference between revisions of "GhettoVCB - clone.sh BASH Script"
Jump to navigation
Jump to search
(Created page with " #!/bin/bash echo "Select the Baseline you would like to make your clone from." unset options i while IFS= read -r -d $'\0' f; do options[i++]="$f" done < <(find -m...") |
(No difference)
|
Revision as of 22:27, 1 July 2020
#!/bin/bash echo "Select the Baseline you would like to make your clone from." unset options i while IFS= read -r -d $'\0' f; do options[i++]="$f" done < <(find -maxdepth 1 -type d -name "CloneMe-*" -printf '%f\0' ) PS3="Enter a number (anything not in the list cancels): " select opt in ${options[@]} #Cancel do case $opt in CloneMe-*) echo "Baseline $opt selected" # processing ls $opt ;; *) echo "This is not in the list" echo "Cancelled!" break ;; esac done