From 56e6c3f78fab11679a5c953ef7c0dcc1a2adf6a7 Mon Sep 17 00:00:00 2001 From: eneller Date: Tue, 23 Aug 2022 17:59:22 +0200 Subject: [PATCH] begin moving to shell script --- mymuesli/mymuesli.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 mymuesli/mymuesli.sh diff --git a/mymuesli/mymuesli.sh b/mymuesli/mymuesli.sh new file mode 100755 index 0000000..9b95175 --- /dev/null +++ b/mymuesli/mymuesli.sh @@ -0,0 +1,29 @@ +#!/bin/bash +BASE_URL="https://mymuesli.com/" +STRING_ALPHABET="abcdefghijklmnopqrstuvwxyz123456789" +STRING_LENGTH="6" +STRING="aaaaaa" +for i in 1 2 ; do + curl ${BASE_URL}$STRING | grep "Einlösbar bis" && echo $output +done + + +incrementString() +{ + inputPos=$1; + if [ $# -eq 0 ]; then + inputPos=$STRING_LENGTH - 1 + fi + # TODO find alphabetic pos of last String char, increment + if [ ]; then # if is highest number, loop around, repeat for higher value + newInputPos=$inputPos -1 + incrementString ${inputPos}-1 + fi + +} + +incrementChar() +{ + $char="$1" + return $char +}