0

This is the goal:

cp file1 file1.bkup

I don't want to type file1 twice, what's the easiest way pls ? in bash or or shells.

Archemar
  • 31,554

1 Answers1

3

If you're using Bash or some other shells, you could use brace expansion:

cp file1{,.bkup}

This will expand to:

cp file1 file1.bkup
John Moon
  • 1,013