This is probably the most important thing one can do in a UNIX based system- Modify the PATH variable.
I recently installed Libreoffice on my mac for using its command line tools. It was working fine in the applications folder and showing up on spotlight as well as dock but the command line tool was not working
After some time , I figured that in Linux, I used “libreoffice ….” but in Mac I had to use “soffice…”. soffice command was not directly available to me on terminal and I had to specify the whole path to use it:
To use soffice without the whole path, I modified my PATH variable :
(create this file using touch ~/.bash_profile if your system doesn’t have one!!)
Include the lines:
Save it and enter the command:
And wallah ! The Path variable is modified and we can now use soffice directly in command line.
This way, we can include any application in command line.
Hope it helps.