Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Is there a way to assert the current "user" is root (i.e. the script was run by root) using the fish shell?
I know for bash you can check the EUID
Can't do it with just fish. I'd write:
if test (id -u) -eq 0
echo not root
1 year, 9 months ago