Skip to content

Commit

Permalink
updated bash script commandline args post
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerwood committed Jun 16, 2024
1 parent a970770 commit ee1909f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/posts/creating-bash-script-with-arguments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ excerpt: When creating a good bash script for others to use, it's important to c
blog: true
tags: [bash]
meta:
- name: description
content: How to create a bash script with commandline arguments.
- name: description
content: How to create a bash script with commandline arguments.
---

{{ $frontmatter.excerpt }}
Expand Down Expand Up @@ -35,6 +35,7 @@ usage() {
SLEEP=60

while [ $# -gt 0 ] ; do
# If you an argument without a value, like a boolean, do "shift 1" instead.
case $1 in
-s | --sleep-seconds) SLEEP="$2"; shift 2 ;;
-e | --exit-code) EXIT="$2"; shift 2 ;;
Expand Down

0 comments on commit ee1909f

Please sign in to comment.