Is there a portable way to get the current username in Python?
What is a portable way (e.g. for Linux and Windows) to get the current user’s username? Something similar to os.getuid() would be nice:
What is a portable way (e.g. for Linux and Windows) to get the current user’s username? Something similar to os.getuid() would be nice:
I have a shell script that uses the following to print a green checkmark in its output:
I have seen the following technique used many times on many different shells, to test if a variable is empty:
Say I need to write a script that will launch a terminal and execute a command and I need that to work on various systems. How can I do that in a safe and portable manner?
Can someone put these tools in order of portability? Which of these is certain to be found on even the most minimal *nix systems? Is any of them 100% sure to be present? My guess is that the order is the following:
How can I safely get the version of ksh from within a ksh script?
I’m trying to Create OS detect portable function in bash script,
What is a portable1 way for a (zsh) script to determine its absolute path?
I’m trying to see how many times foo bar appears in /var/log/foo.log within an arbitrary amount of time on a remote server, but nothing that I’ve tried so far has worked.