Quantcast
Viewing latest article 5
Browse Latest Browse All 5

Environment Variable for Username

What is the Linux equivalent of %username%?

I need to run a script on multiple Linux boxes every few days. I made a .sh file, and it works fine. The script deletes some files at a certain path. Problem is that the path includes the username (no, not in /home), which is different on each machine.

For now, I simply modified the script on each machine to match the username used there. But I want to have a script that will work, without needing to modify it.

So: does Linux have such functions? Duh, I'm sure it does, you noob....


Viewing latest article 5
Browse Latest Browse All 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>