Skip to content

Instantly share code, notes, and snippets.

@fumiyas
Forked from mattn/fof.sh
Last active December 10, 2015 23:28
Show Gist options
  • Save fumiyas/4509216 to your computer and use it in GitHub Desktop.
Save fumiyas/4509216 to your computer and use it in GitHub Desktop.
#!/bin/ksh
i=0
ls |while read b; do
i=`expr $i + 1`
echo "$i $b"
done
echo "total $i"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment