if you use $ID after that point, then you lose our on your ID_LIKE preference .
you mean that if i were to change $ID afterwards and run the conditional again then i’d lose the initial value?
if you use $dist after that point, it’s not going to be set if ID is already set .
you’re right, so more code, another conditional, would be needed like: if $ID is already set, then put it to dist=.. which would mask the family in a context where the user already has the environ with $ID=kali, then my code wouldn’t do anything still hmmmm :02think:
mebbe like this?:
if [ -z "$ID_LIKE" ] && [ -f /etc/os-release ] then . /etc/os-release else return 1 fi dist="${ID_LIKE:-$ID}"