Bareword "file" not allowed while "strict subs" in use at line 2, in:file. | use rename command

Опубликовано: 29 Сентябрь 2024
на канале: linux-syr
209
1

Syntax Rename Command for Linux:
rename [OPTIONS] Perlexpressions files

The rename command will rename files according to the specific regular Perl expressions.
Example

for example to change all .bash files to a .txt files we will the following command:

$sudo rename 's/.bash/.txt/' *.bash

otherwise for normal rename process use the command mv:

mv file1.pdf file2.pdf