Xioth

Bash - TD1 - tailleTotale.sh

Jan 25th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.20 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. taille=$(ls -lrt | cut -d ' ' -f5)
  4. tailleTotale=0
  5.  
  6. for t in $taille
  7. do
  8.     tailleTotale=$(($t+$tailleTotale))
  9. done
  10.  
  11. echo "La taille totale de ce répertoire est de $tailleTotale octets"
Add Comment
Please, Sign In to add comment