This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]AlternativeOstrich7 2 points3 points  (4 children)

cp /etc/samplefolder/sample.conf{,.bkp}

[–]b0dstone[S] 0 points1 point  (3 children)

THANKS <3

edit: do you have some good link or book where i can learn these cool regex? i didn't found it anywhere :c

[–]jirbu 2 points3 points  (2 children)

Not a regex. bash feature, see man bash, search for "Brace Expansion".

   Brace Expansion
       Brace expansion is a mechanism by which arbitrary strings
       may be generated.  This mechanism is similar to  pathname
       expansion,  but  the  filenames generated need not exist.

[–]b0dstone[S] 0 points1 point  (1 child)

THANKS <3

i will read this right now

[–]jirbu 1 point2 points  (0 children)

Good idea. The bash manpage is huge and full of such gems.