view bin/example/args.sh @ 852:565875bc93b7

[bash example] interpolatation skeleton
author Jeff Hammel <k0scist@gmail.com>
date Sun, 10 Dec 2017 11:38:00 -0800
parents 5bee5c55a7a0
children
line wrap: on
line source

#!/bin/bash

function foo {
 echo '$*'="$*"
 echo '$@'="$@"
 echo '$#'="$#"
 if [[ "$*" == "test string" ]]
 then
     echo '$*' == "test string"
     if [[ "$@" == "test string" ]]
     then
         echo '$@' == "test string"
     else
         echo '$@' != "test string"
     fi
 fi
}