I corrected some typos. This one is syntactically correct:

    $ mv file.txt{,.bak}
    file.txt.bak
    $ mv file.txt.{bak,img}
    file.txt.img
    $ mv file.txt{.img,}
    file.txt

-Ramon

On 06/10/2022 17:19, Ramon Fischer wrote:
And if you like Bash brace expansions; this one is sometimes quicker, than tab-completion and removing characters:

    $ mv file.txt{,.bak}
    file.txt.bak
    $ mv file.txt,{bak,img}
    file.txt.img
    $ mv file.txt{img,}
    file.txt

-Ramon

--
GPG public key: 5983 98DA 5F4D A464 38FD CF87 155B E264 13E6 99BF

Attachment: OpenPGP_0x155BE26413E699BF.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to