Skip to main content
1 vote

Get a list of all user's commands from a non-interactive shell

Turns out, I was quite close to the solution. I was confusing login shells and interactive shells. Different things. Instead of $SHELL --login, all I needed to do was $SHELL -i. The following will ...
zoickx's user avatar
  • 51
1 vote

Basename of the root directory: why does it return the root directory itself?

Certainly / is a leading directory component and has not been removed. ... php's basename() function returns the empty string for that case. Frame challenge: how about something like /path/to/some/...
muru's user avatar
  • 73.9k

Only top scored, non community-wiki answers of a minimum length are eligible