Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #watch a file or all files in a directory
- #Mac OS X has no watch command
- #this script simulates the watch command
- clear="/usr/bin/clear"
- ls="/bin/ls"
- sleep="/bin/sleep"
- clear
- if [ -s "$1" ]
- then
- while ls -skhTuorc "$1"; do sleep 0.98; clear; done
- else
- while ls -skhTuorc; do sleep 0.98; clear; done
- fi
- exit
Add Comment
Please, Sign In to add comment