I have a curl script where one of the variables in the URL is actually the name of .sh file.
So, if file name is test.sh then in the script I would want curl www.example.com/test where it would grab the 'test' from the file name.
I'm able to obtain the actual name by using a combination of answers I see here: How do I know the script file name in a Bash script?.
However, being new to this I'm not exactly sure how it should be formatted and specifically how to output the variable.
Would appreciate any help