Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env /bin/bash
- pth="${HOME}/path/to/files"
- fls=( $( ls "${pth}" ) )
- for fl in ${fls[@]} ; do
- tf="${pth}/${fl}"
- if [[ -f "${tf}" ]]; then
- printf "FILE: %s \n" "${fl}"
- tail -n 2 "${tf}" |head -n 1
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment