I've been trying to make a script and in this script I would like to update the folder name and a bunch of other things using a variable.
the folder i create is going to be called the latest version release name it has on github.
#!/bin/sh
content=$(curl -s -L https://github.com/FAForever/client/releases)
fl=tr '\n' ' ' < $content | grep -E "^<div class=\"release-title\">.*</div>$"
echo $fl
#!/bin/sh
s=$(curl -s https://github.com/FAForever/client/releases | grep "div class='release-title'")
echo "$s"
I've looked all over the web for this and noone does this specific setup (source curl/ output shell var)
all have some sort of file input or output or other and I can't make use of their solutions.
what is the correct syntax in shell to grab only one class' content and store it in a shell variable?
Thank you.