To look for files that end with a blank line
Sometimes it's important to get rid of those blank lines in the end of your scripts. Hopefully the *nix shell is very powerfull. One liner:
while read i; do (tail -1 $i | grep "^$" > /dev/null) && echo $i; done < <(find . -name \*.php)Written by Cyber
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best #Shell Authors
Sponsored by #native_company# — Learn More
#native_title# #native_desc#