@nixCraft find + mv + shell parameter expansion + test:
find -mindepth 1 -maxdepth 1 -type f -exec bash -c 'file="{}"; [ "${file}" != "${file//needle/replacement}" ] && mv "${file}" "${file//needle/replacement}"' \;

man find
man mv
man test
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html

#term_tips

Shell Parameter Expansion (Bash Reference Manual)

Shell Parameter Expansion (Bash Reference Manual)

Quand tu t'es enfermé dehors pendant N minutes en faisant trois fois un mauvais mot de passe sur ton compte utilisateur linux mais que tu arrives à te connecter en root, pour vider les logs de tentatives de connexion ratées :

faillock --user utilisateur --reset

#term_tips #linux #faillock #lockedOut

I just discovered some #bash / #zsh #shell syntax:
${variable:-default_if_empty}
${variable:+default_if_not_empty}
${variable:=value_assigned_if_not_empty}

#term_tips

@climagic Boosted, fav'd and bookmarked, so there is a tiny little chance I can find it again when I need it in the future. 😆
#term_tips #tmux

A reminder to myself that the `uniq` command is not only for removing duplicate lines (usually after piping from the `sort` command), but that it can also keep only the duplicated lines (-d option) or the unique lines (-u option), count duplicate lines (-c option), and a few more things.

#term_tips #terminal #unix #linux #uniq