Advertisement
Xioth

Bash - TD1 - compteVide.sh

Jan 25th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.17 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. compteur=0
  4.  
  5. while true
  6. do
  7.     read entry
  8.     if echo $entry | grep "^\s*$"
  9.     then
  10.         ((compteur++))
  11.     fi
  12.  
  13.     echo "Vous avez entrez $compteur lignes vides !"
  14. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement