3 ms·
simpler: just this, after the result=.. docker exec -it "$result" "${1:-/bin/bash}"
by svilen_dobrev 3y ago
simpler: just this, after the result=..
docker exec -it "$result" "${1:-/bin/bash}"
- xp84 3y agoCan you explain this last part? This is why I usually stop myself from trying anything very complex with shell scripts: unlike scripting languages, half the power of shell is hiding inside little piles of punctuation marks that I don’t think I can even Google!
- noir_lord 3y agoUse the argument ($1) if supplied otherwise default to /bin/bash. It's why I avoid using stuff like that because I won't remember how it works in 6mths.