4 ms·
Also, in which shell does `cd $` change into a newly created directory?
by Rokid 5y ago
Also, 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.