I got 2 bash scripts:
script1.sh
#!/bin/bashTAG=`git rev-parse --short HEAD` #pass hash commit numbersdocker build -t $TAG .
script2.sh
#!/bin/bashcat $TAG
I want to run script1.sh and then script2.sh.How to pass variable TAG that script2 knows the value? It should work automatically I mean only run a command. These scripts will be run in pipelines e.g. bamboo/jenkins so I want that second script knows value of variable from the first one. export command in this case is not useful