Differences

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

Link to this comparison view

Both sides previous revision Previous revision
user:meriem [2023/01/22 15:58] – [Dump database] azizuser:meriem [2023/01/22 16:01] (current) – [*awk*] aziz
Line 346: Line 346:
  
  
-==== *awk====+==== awk ====
 afficher la premiere colonne: ''ps | awk '{print $1}''' afficher la premiere colonne: ''ps | awk '{print $1}'''
  
 print colonne 1 and 6 and 7 with tab between them: ''cat /etc/passwd | awk -F ":" '{print $1"\t " $6" " $7}''' print colonne 1 and 6 and 7 with tab between them: ''cat /etc/passwd | awk -F ":" '{print $1"\t " $6" " $7}'''
  
-on va les separées par des "-": ''cat /etc/passwd | awk 'BEGIN{FS=":"; OFS="-"} {print $1,$6,$7}'''+on va les séparer par des "-": ''cat /etc/passwd | awk 'BEGIN{FS=":"; OFS="-"} {print $1,$6,$7}'''
  
-afficher toute les ligne qui commance par "/": <cli> sudo df | awk '/^\// {print }' </cli>+afficher toute les ligne qui commance par "/": <cli> sudo df | awk '/^\// {print}' </cli>
  
  
 on va prendre la dernière colonne depuis les lignes qui commence par "/": <cli>awk -F "/" '/^\// {print $NF}' /etc/shells </cli> on va prendre la dernière colonne depuis les lignes qui commence par "/": <cli>awk -F "/" '/^\// {print $NF}' /etc/shells </cli>
-  
-=== GPG === 
- 
-* pour decrypter le contenu sans le mettre dans un nv fichier: ''gpg -d nomfichier.gpg'' 
  
 ===== emacs ===== ===== emacs =====
  • user/meriem.1674403091.txt.gz
  • Last modified: 2023/01/22 15:58
  • by aziz