$ cp test{,.bak}
$ ls
test test.bak
will expand the first non existent parameter (note just the comma in the curly brackets) as the file name test making a copy named test.bak.
Very useful as it allowes you to type less since you have to supply only one argument plus the new file's extension.
No comments:
Post a Comment