Is there a way to detect OS in fish shell akin to the OSTYPE variable in bash? -
Now I'm forced to use the It seems that the statutory method of executing a conditional code based on the operating system type Using the uname to get the operating system name is. But
bash has
OSTYPE environment variable that is set automatically and I was thinking that something is similar.
switch with the
uname result remove. See examples:
Switch (Single) Case Linux Echo Hi Tux! Case Darwin Echo Hi Hexley! Hi Free Hi! Hi Case! FreeBSD NetBSD DragonFly Hi! The case '*' echo, hi stranger! End
Comments
Post a Comment