I spent a frustrating few hours trying to debug why one of my autostart script wasn't working. But the text $HOME/Documents or ~/Documents has to be expanded by the shell in order to become the path we mean. Since $HOME should be an absolute path, the value of $HOME/Documents is also an absolute path. To illustrate, ~/Documents is approximately the same thing as $HOME/Documents (again, shell syntax). ~ is syntax implemented by the shell (and other programs which imitate it for convenience) which expands it into a real pathname. More importantly, I want to highlight this gotcha from the above unix.stackexchange thread: ![]() I do not much care if it is correct to call it a relative or absolute path. Is ~/projects a relative or an absolute path? See this unix.stackexchange thread for answers. The string represented by these arguments are displayed in the output separated by a single space character.ģ) Go through bash manual: Tilde Expansion. ![]() ![]() In the above command, there are three arguments passed to the echo command - apple, 42 and 'banana 100'. From help echo (since the builtin version is the default):ĭisplay the ARGs, separated by a single space character and followed by a newline, on the standard output. Yes, the documentation helps to understand the above result.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |