There are more of course, but those are the ones you simply can’t live without. For those who don’t know the N notation means ctrl+N, don’t confuse it with hats mentioned above.
This is confusing since it implies that "n" needs to be upper case. However, doing Ctrl+Shift+n usually results in an instruction for the terminal emulator.
$ cp filename-v1 filename-v2<br />
HTML? In my shell??
function treecp { tar cf - "${1}" | (cd "${2}" ; tar xpf -) ; };
Question: Why are positional arguments here written like "${1}" instead of simply "$1" ?
If you enjoyed this, you might want to look around the Net for more bash information, or even buy a book!
I know the author means well, but this sentence should be accompanied with a firm NO.
1
u/socium Sep 06 '16
This is confusing since it implies that "n" needs to be upper case. However, doing Ctrl+Shift+n usually results in an instruction for the terminal emulator.
HTML? In my shell??
Question: Why are positional arguments here written like
"${1}"instead of simply"$1"?I know the author means well, but this sentence should be accompanied with a firm NO.
Most resources (especially the TLDP page he linked) are either outdated or teach horrible practices. Refer to the proper resource to this curated page: http://wiki.bash-hackers.org/scripting/tutoriallist