Lines Matching refs:f
8 f="$1"
10 if [ -z "$f" ]; then
15 if [ ! -f "$f" ]; then
19 if [[ $(tail -c1 "$f") ]]; then
20 echo "$f: No newline at end of file"
21 echo '' >> "$f"
25 if [[ ! $(tail -c2 "$f") ]]; then
26 echo "$f: Extra trailing newline"
30 if grep -q $'\r' "$f"; then
31 echo "$f: DOS-style newlines"
32 dos2unix "$f" &> /dev/null
36 if grep -q $'[\t ]$' "$f"; then
37 echo "$f: Trailing whitespace"
38 sed -i $'s/[ \t]*$//' "$f"