User Tools

Site Tools


informatique:linux:awk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
informatique:linux:awk [2015/08/28 09:07] – [Les fonctions texte] pteuinformatique:linux:awk [2017/09/29 14:09] – [Exemples] pteu
Line 173: Line 173:
 echo "toto.domaine.fr est un nom trop long !" | awk 'gsub(/\..*$/,"",$1) {print "machine="$1}' echo "toto.domaine.fr est un nom trop long !" | awk 'gsub(/\..*$/,"",$1) {print "machine="$1}'
 </code> </code>
 +
 +  * afficher les blocs de texte du fichier FIC.txt compris entre les balises BEGIN et END :
 +<code bash>
 +awk '/BEGIN/,/END/' FILE.txt
 +</code> 
  
informatique/linux/awk.txt · Last modified: 2022/04/13 13:03 by pteu