Re:Thank you, GitHub
by thesausageking on Wednesday November 03, 2021 @02:28PM
(#29098533)
Why "cd ~ && mkdir -p nat/next" instead of just "mkdir -p ~/nat/next"?
[ Parent
| on HN ]
Maybe he is first going home, than moving on to the next thing?
That’s how I read it
Popping the stack so to speak before embarking on the next ____.
Also, in which shell does `cd $` change into a newly created directory?
it's `cd $_` with the underscore, it repeat the last argument.
from bash man page
> _ At shell startup, set to the pathname used to invoke the shell or shell script being executed as passed in the environment or argument list. Subse‐
> quently, expands to the last argument to the previous simple command executed in the foreground, after expansion. Also set to the full pathname used
> to invoke each command executed and placed in the environment exported to that command. When checking mail, this parameter holds the name of the
> mail file currently being checked.