I want to append a previously exported string to a new one, so that:
export TAG=img
export FILENAME=$TAG_001.jpg
The result I'd like to obtain is $FILENAME=img_001.jpg
, but the export processes it as $TAG_001
instead of $TAG
Try
export FILENAME=${TAG}_001.jpg