harold50 Posted March 10, 2008 Share Posted March 10, 2008 bonjour j'ai un fichier ou chaque ligne est composé de colonnes séparées par des "|" et je dois ecrire un script pour récupérer la sixieme colonne de chaque ligne et l'afficher. mais en utilisant grep et cat je n'y arrive pas. pendant mes recherches j'ai trouvé awk ke je ne connais pas. pouvez vous me dire comment faire? merci Link to comment Share on other sites More sharing options...
theocrite Posted March 10, 2008 Share Posted March 10, 2008 cut -d'|' -f6 man cut Link to comment Share on other sites More sharing options...
harold50 Posted March 10, 2008 Author Share Posted March 10, 2008 cut -d'|' -f6man cut merci pour ton aide mais peut récupérer la sortie de cette commande dans un fichier? Link to comment Share on other sites More sharing options...
SnipX Posted March 10, 2008 Share Posted March 10, 2008 cut -d'|' -f6 > tonfichier Lis les bases d'Unix/Linux, c'est très utiles : http://scipreforma.univ-paris1.fr/statique...tions_unix.html Chapitre redirection. Link to comment Share on other sites More sharing options...
harold50 Posted March 10, 2008 Author Share Posted March 10, 2008 cut -d'|' -f6 > tonfichierLis les bases d'Unix/Linux, c'est très utiles : http://scipreforma.univ-paris1.fr/statique...tions_unix.html Chapitre redirection. désolé du dérangement mais je me suis rappelé du ">". Link to comment Share on other sites More sharing options...
lorinc Posted March 10, 2008 Share Posted March 10, 2008 la même chose avec awk pour mémoire : awk -F "|" '{print $1}' Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.