Try printing modules in two columns

This commit is contained in:
2024-08-04 00:35:41 -04:00
parent 76546333bf
commit 26a4f3a800

View File

@@ -361,8 +361,8 @@ interactive_header() {
EOF EOF
echo "" echo ""
echo "Using scans directory: $SCANS_DIR" echo "Scans directory: $SCANS_DIR"
echo "Using output directory: $OUT_DIR" echo "Output directory: $OUT_DIR"
echo "Change the SCANS_DIR or OUT_DIR environment variable(s) to override" echo "Change the SCANS_DIR or OUT_DIR environment variable(s) to override"
echo "Example: SCANS_DIR=/path/to/scans OUT_DIR=/path/to/out ./qhtcp-workflow $*" echo "Example: SCANS_DIR=/path/to/scans OUT_DIR=/path/to/out ./qhtcp-workflow $*"
echo "" echo ""
@@ -387,9 +387,10 @@ interactive_header() {
echo "" echo ""
echo "Available Modules:" echo "Available Modules:"
for i in "${!ALL_MODULES[@]}"; do # Print the array with item numbers in two columns
printf "%d. %s\n" "$((i+1))" "${ALL_MODULES[i]}" for ((i=0; i<${#ALL_MODULES[@]}; i++)); do
done printf "%d\t%s\n" $((i+1)) "${ALL_MODULES[i]}"
done | column -t -s $'\t'
echo "" echo ""
echo "Available Submodules:" echo "Available Submodules:"