I don't remember exactly but there was either cp
or mv
command which I was able to do something like this with:
cp file{.cpp, .cpp.org}
Which would copy file.cpp
and make a copy named file.cpp.org
. Any suggestions?
I don't remember exactly but there was either cp
or mv
command which I was able to do something like this with:
cp file{.cpp, .cpp.org}
Which would copy file.cpp
and make a copy named file.cpp.org
. Any suggestions?
This is a property of the shell, and not a property of the command itself. Check for more info: http://wiki.bash-hackers.org/syntax/expansion/brace
On the command line,
file{.cpp,.cpp.org}
will always expand to
file.cpp file.cpp.org
In your example, it would be shorter to just type
file.cpp{,.org}