"Fossies" - the Fresh Open Source Software Archive

Member "argbash-2.10.0/resources/examples/minimal.m4" (22 Sep 2020, 963 Bytes) of package /linux/privat/argbash-2.10.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "minimal.m4": 2.9.0_vs_2.10.0.

    1 #!/bin/bash
    2 
    3 # m4_ignore(
    4 echo "This is just a script template, not the script (yet) - pass it to 'argbash' to fix this." >&2
    5 exit 11  #)Created by argbash-init v2.10.0
    6 # ARG_OPTIONAL_SINGLE([option], o, [A option with short and long flags and default], [boo])
    7 # ARG_OPTIONAL_BOOLEAN([print], , [A boolean option with long flag (and implicit default: off)])
    8 # ARG_POSITIONAL_SINGLE([positional-arg], [Positional arg description], )
    9 # ARG_DEFAULTS_POS
   10 # ARG_HELP([This is a minimal demo of Argbash potential])
   11 # ARG_VERSION([echo $0 v0.1])
   12 # ARGBASH_SET_INDENT([  ])
   13 # ARGBASH_GO
   14 
   15 # [ <-- needed because of Argbash
   16 
   17 # vvv  PLACE YOUR CODE HERE  vvv
   18 # For example:
   19 if [ "$_arg_print" = on ]
   20 then
   21   echo "Positional arg value: '$_arg_positional_arg'"
   22   echo "Optional arg '--option' value: '$_arg_option'"
   23 else
   24   echo "Not telling anything, print not requested"
   25 fi
   26 
   27 # ^^^  TERMINATE YOUR CODE BEFORE THE BOTTOM ARGBASH MARKER  ^^^
   28 
   29 # ] <-- needed because of Argbash