I have the following AWK command which works well.
awk -v RS="\n+?[$]{4}\n+?" '/HMDB0000008/' test.xt
However what I want is to be able to call it from the command line and pass an argument so that it can find what I want.
For example, something like this:
awk -f var=HMDB0000008 RS="\n+?[$]{4}\n+?" '/$var/' test.txt
However this does not seem to work. Can you tell me what would be the best way?
Thank you