Removing incorrect characters in files

Today I realized that in some files I used, I had a | character that provoked them to be of little use (and provoke misconfiguration on the system), so I thought of removing them in a row. The choice was obvious, use tr to remove these characters, and it was perhaps the easier to script to do:

for e in $(grep -R "|" /var/lib/files/* | cut -d: -f1)
tr -d '|' < $e > $e

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.