diff options
| author | St33v <github@f3rr3t.com> | 2020-03-04 15:33:24 +1100 |
|---|---|---|
| committer | St33v <github@f3rr3t.com> | 2020-03-04 15:33:24 +1100 |
| commit | fa587f8cee83fcbbd77fb1852c2e239388933ff5 (patch) | |
| tree | d3eafc2d208335cc2aa6ff8a0f8978701de1b1b7 | |
| parent | 8efec0edecd4073f384979e9dd04c9d962275c19 (diff) | |
Fix argment passed to func
| -rwxr-xr-x | pruner.sh | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,7 +1,9 @@ #!/usr/bin/bash function Pruner { - echo 'Hello' $1 There are $# arguments - if [ $# -eq 1 ]; then + echo 'Hello' $1 There are "$#" arguments + echo "ONE $1 TWO $2 THREE $3" + if [ "$#" -eq 1 ]; then + echo "I saw $# argument." borg prune \ --prefix $1 \ --list \ @@ -19,4 +21,4 @@ function Pruner { } -Pruner $1 +Pruner "$@" |
