I\'m looking a way to build conditional assignments in bash:
In Java it looks like this:
int variable= (condition) ? 1 : 0;
If you want to assign a value unless variable is empty use this:
[ -z "$variable" ] && variable="defaultValue"
You can put as well, each other condition on the []
[]