Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. ls foo:
  2. 1.aa 2.bb 3.aa 4.cc
  3.  
  4. SUFF='aa'
  5. FILES=`ls -1 *."$SUFF" foo`
  6. COUNT=`echo $FILES | wc -l`
  7. echo "$COUNT files have suffix $SUFF, they are: $FILES"
  8.  
  9. COUNT=`ls -1 *."$SUFF" foo | wc -l`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement