i have the following bash code:
function () {
curl="$(curl -s "$2" >> "$1")"
version="$(grep '$3' $1 | $4 )"
echo $version
}
function "test" "https://google.com" "String" "cut -d' ' -f3 | cut -d'<' -f1"
Basically the function downloads the page and then uses grep to look for a specific string. After that "cut", cuts down the results further. But ... unfortenatly the cut inside the function doesn't work. I only get the following output:
"usage: cut -b list [-n] [file ...]
cut -c list [file ...]
cut -f list [-s] [-d delim] [file ...]"
Maybe i overlooked something ... or maybe you have a better idea :-)