m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2022-11-29 14:54:57 +0100
committerMarcin Chrzanowski <m@m-chrzan.xyz>2022-11-29 14:54:57 +0100
commit1e83925db48bb6d5fbc458d3f925159f7dacab22 (patch)
treed511e5503cc74a1fdeb487cefd2a72c9abe1394b
parentb3056da180f372ae74c453f04e56bfdefb2d159b (diff)
Add bash scripting with positional arguments
-rw-r--r--bash.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/bash.md b/bash.md
index 12312c6..6258795 100644
--- a/bash.md
+++ b/bash.md
@@ -88,3 +88,10 @@ All keys:
*) error "Unexpected option ${flag}" ;;
esac
done
+
+### With positional arguments
+
+Positional arguments will have to be supplied after flag options (`command
+[options] <args>`):
+
+ shift $((OPTIND-1))