Reputation: 35
Using bash script function with a following command, looking for a way to print command for before execution for logging purposes without using bash -x, is that possible ? Problematic part is a last command.
helm upgrade $2 chart --install --wait --timeout $3 $debug "${@:4}"
Would like to print a following:
helm upgrade mypod chart --install --wait --timeout 600s --set key=value
Upvotes: 0
Views: 112
Reputation: 69218
Why not just turning debug on and off?
set -x
helm upgrade $2 chart --install --wait --timeout $3 $debug "${@:4}"
set +x
other commands...
Upvotes: 2