bash utils: use proper `sudo -i` and shorten some ifs in function R
bash features: declare more variables local