summaryrefslogtreecommitdiff
path: root/day1/ex03/count_files.sh
blob: 013e7a08565bd420dd5d2b590516f76b4f6983d6 (plain)
1
2
3
4
5
#!/bin/sh

# Shell script to count number of files in a given directory

ls | cat -n | tail -1 | grep -Eo '[0-9]{1,4}'