Advertisement
razvanth21

SO1

Oct 6th, 2018
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.25 KB | None | 0 0
  1. #! /bin/sh
  2.  
  3. if [ $# -ne 1 ]
  4. then
  5.     echo "Input directory path."
  6.     exit
  7. fi
  8.  
  9. for i in "$1"/*
  10. do
  11.     if [ -d $i ]
  12.     then
  13.         echo "$i"
  14.     elif [ -f $i ]
  15.     then
  16.         marime=`ls -l $i | tr -s ' ' | cut -f 5 -d ' '`
  17.         echo "Marime: $marime"
  18.     fi
  19. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement