Issue
I am currently having to work with scripts written by somebody else. I have very basic understanding of scripting but the scripts I am dealing with have flags such as -i,-e, -o,-v, -h etc......
I just could not decode the script below.
sed -i -e 's/^\(var = \)$/\1 "'"$1"'"/' /some/dir
Are there any tutorials, books, articles that could teach intermediate-advanced scripting?
Solution
For things like command-line flags I usually refer to the man page. In the case of the example above, running man sed
should show the manual for sed describing command line options.
For bash scripting in general (the title of the question), I recommend Greg's bash guide at https://mywiki.wooledge.org/BashGuide and the associated FAQ: https://mywiki.wooledge.org/BashFAQ
Answered By - janneb Answer Checked By - Marie Seifert (WPSolving Admin)