Stephane List wrote:
Salut,

Quand je fais un grep sur un fichier texte dont la dernière ligne ne contient
pas un eol (end of line), grep me dit que mon fichier est binaire !
Comment fait on pour ajouter un eol, ou pour tromper grep ?

salut,

pour ajouter un eol a la fin du fichier :
echo >> fichier

pour dire a grep de traiter le fichier comme un fichier texte :
man grep

-a, --text
       Process  a  binary file as if it were text; this is
       equivalent to the --binary-files=text option.

a+
ben


Linux-Azur :      http://www.linux-azur.org
Désinscriptions: http://www.linux-azur.org/liste.php3
**** Pas de message au format HTML, SVP ****

Répondre à