What is this code doing? Especially the ${1}.TmpOut.
#!/usr/bin/env bash
if [ ! -f mergedOrca.out ]; then
echo "" > O2.out.orc
fi
cat ${1}.TmpOut >> O2.out.orc
What is this code doing? Especially the ${1}.TmpOut.
#!/usr/bin/env bash
if [ ! -f mergedOrca.out ]; then
echo "" > O2.out.orc
fi
cat ${1}.TmpOut >> O2.out.orc
You are seeing a positional parameter in the last line. The value of the first argument to the script is $1 or if you prefer, ${1}.
The curly braces also resolve ambiguity in expressions.
${1}is the same as$1. See https://mywiki.wooledge.org/BashGuide/Parameters – ilkkachu Oct 22 '22 at 16:04"${1}.TmpOut"or"${1}".TmpOut) unless you have a good reason not to, and you’re sure you know what you’re doing. – G-Man Says 'Reinstate Monica' Oct 23 '22 at 02:14