I have a couple of questions:
On PC I can get the username from the environment variable
USERNAMEand on LINUX it is
USER- what the MAC equivalent?
The users local area on windows can be found via the registry (or equivalent) , on LINUX you type
~at the command prompt - what is the MAC equivalent?
Note I would like to extract these from environment variables if possible (from code).
e.g. I want to create a file in the users home area on MAC > how would I build the following variable -:
This is what I think it is - can anyone confirm (note I dont currently have a MAC in front of me to test it...)
% e.g. userName = getenv ( 'USER' ); userLocalArea = '~/Library/Preferences/'; filename = fullfile ( userLocalArea, userName );
In the end the language I am doing this in is Matlab - but its a pretty general question...