Bash

Tags: scripting

Related tools:

#!/bin/bash FRIEND="world" HELP=" Usage: hello [OPTION]... Greets the given friend. Defaults to \"$FRIEND\" -f, --friend <name> specify friend to greet -h, --help print this help text " while [ "$#" -gt 0 ]; do case "$1" in -f | --friend) FRIEND="$2" shift 1 ;; *) echo "Unrecognized argument ${1#*=}" print-help "$HELP" exit 1 ;; esac shift done echo "Hello, $FRIEND!"
Bash Summary
Language Bash
Home Page