begin moving to shell script
This commit is contained in:
29
mymuesli/mymuesli.sh
Executable file
29
mymuesli/mymuesli.sh
Executable file
@@ -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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user