Choose

choose

Pick one element at random from the given arguments.

Example

choose apple banana cherry    # prints one of the three
day=$(choose Mon Tue Wed Thu Fri)

Arguments

  • ... (string): Elements to choose from

Exit codes

  • 0: Always; 1 No arguments

Output on stdout

  • The chosen element