Skip to content

Commit

Permalink
A test shell script with which the workflow should succeed
Browse files Browse the repository at this point in the history
  • Loading branch information
sand194 committed Dec 29, 2023
1 parent 8454dc2 commit 8b65f3d
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions test1.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
#!/bin/bash
## Example: ShellCheck can detect some higher level semantic problems

while getopts "nf:" param
for (( n=2; n<=10; n++ ))
do
case "$param" in
f) file="$OPTARG" ;;
v) set -x ;;
esac
echo "$n seconds"
done

case "$file" in
*.gz) gzip -d "$file" ;;
*.zip) unzip "$file" ;;
*.tar.gz) tar xzf "$file" ;;
*) echo "Unknown filetype" ;;
esac

if [[ "$$(uname)" == "Linux" ]]
then
echo "Using Linux"
fi

0 comments on commit 8b65f3d

Please sign in to comment.