Newsletter
Liste des sujets

Aide grep

tueur70
tueur70
Niveau 45
15 octobre 2016 à 22:03:49

Yo,
j'aurai besoin d'aide pour la fonction grep https://image.noelshack.com/fichiers/2016/30/1469541957-risitas198.png je suis novice sur le shell
Je cherche à afficher les lignes qui ne commence pas par un espace ou par un G; la fonction c'est (grep ^[^G] nom_fichier) mais j'arrive pas à symboliser l'espace https://image.noelshack.com/fichiers/2016/38/1474490235-risitas434.png

gunrell
gunrell
Niveau 21
15 octobre 2016 à 22:42:08

grep '^[^\s ]' test

deepblue
deepblue
Niveau 16
15 octobre 2016 à 23:01:06
$ cat /tmp/foo 
  Test
Simon
Goo
goo
$ grep -v '^[ G]' /tmp/foo 
Simon
goo
tueur70
tueur70
Niveau 45
15 octobre 2016 à 23:03:51

https://image.noelshack.com/fichiers/2016/38/1474488578-jesus20.png Merci

Sous forums
  • Aide à l'achat Mac
  • Création de Jeux
  • Linux
  • Création de sites web
  • Programmation
  • Internet
  • Steam Deck
  • Macintosh
  • Hardware
La vidéo du moment