Ajout de colonne dans un fichier csv (avec recherche dans une variable)

From Tuxunix
Jump to: navigation, search
 for i in $(cat passwords.csv); do 
   if $(grep -q "mgmnt" <<< "${i}"); then
     echo ${i} | awk -F "," '{print $1","$2",""DefaultMdp"","$4","$5","$6","$7","$8","$9","$10}' >> newPassword.csv;
   else
     continue;
   fi 
 done