Artificial intelligent assistant

Renaming symlinks, using regex with boolean "|" on Linux I have three icons: _notte_ (not a symlink), astronomy (symlink) and gnome-astronomy (symlink). ls -l astronomy.svg -> celestia.svg gnome-astronomy.svg -> konquest.svg notte.svg I want to rename the two symlinks to notte. It should be like: ls -l astronomy.svg -> notte.svg gnome-astronomy.svg -> notte.svg notte.svg The `rename` command is: rename -s 'celestia' -- 'notte' *.svg I expected to run the commands, using regex with "|", but it did not work. Here is like: rename -s -n 'konquest\|celestia' -- 'notte' *.svg rename -s -n 's/konquest\|celestia/notte/g' *.svg rename -s -n 's/\(konquest\|celestia\)/notte/g' *.svg This case works only if without `-s` and if the files are not symlinks.

The `rename` utility of the `util-linux` package which is also known as `rename.ul` doesn't understand regexes and `-n`, but the `-s` switch.

You could rename the symlink targets in a loop with:


for i in konquest celestia; do
rename.ul -s "$i" notte *.svg
done


The Perl `rename` script does understand regexes and `-n`, but cannot rename symlink targets.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 40536fe8b0726a05a651e0caa05944b5