Linux / Unix: Bash Shell Assign Printf Result To Variable
You can assign the result of a printf command to a variable in the bash shell by using command substitution. Command substitution allows you to execute a command and capture its output as the result of the substitution. To assign the result of a printf command to a variable, use the following syntax: VAR=$(printf “format … Read more