4 ms·
Why "cd ~ && mkdir -p nat/next" instead of just "mkdir -p ~/nat/next"?
by thesausageking 5y ago
Why "cd ~ && mkdir -p nat/next" instead of just "mkdir -p ~/nat/next"?
- hnov 5y agoPopping the stack so to speak before embarking on the next ____.
- yibers 5y agoMaybe he is first going home, than moving on to the next thing?
- gscho 5y agoThat’s how I read it
- Rokid 5y agoAlso, in which shell does `cd $` change into a newly created directory?
- staz 5y agoit'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.