Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 10 lines (8 sloc) 200 Bytes
# Silly Utilities: foornt
# Check if a file is open.
#!/bin/dash
if (lsof | grep -q $1) && ! (lsof | grep -q $1 | grep -q "(deleted)"); then
echo "$1 is open."
else
echo "$1 is not open."
fi