Bash: Menu Seed Script

 

Simple seed script for creating a menu system on linux( from stackoverflow )

#!/bin/bash
# Menu Runner

PS3='Please enter choice: '
opts=("ls" "pwd" "opt3" "Quit")
select opt in "${opts[@]}"
do
    case $opt in
        "ls")
            echo "u chose ls"
            ;;
        "pwd")
            echo "u chose pwd"
            ;;
        "opt3")
            echo "u typed '$REPLY' which calls '$opt'"
            ;;
        "Quit")
            break
            ;;
            *) echo "invalid option $REPLY";;
    esac
done

 

Tags

6 Best Practices with Integration Testing in CI Environments: TechBeacon

 

  • Integration first, until the fail
  • Then run Unit Tests to ID source
  • When Unit Tests pass again
  • Run Integration Tests
  • Bounce between the two until both are passing
Subscribe to