aboutsummaryrefslogblamecommitdiff
path: root/bin/stbl
blob: 7b1b1d2cd7ce89cb6e138da7aa6220184e415928 (plain) (tree)
1
2
3
4
5
6
7
         
                                                             
                        
                                         

          
           




                          
#!/bin/sh
# Strip a trailing blank line from the given files with ed(1)
if [ "$#" -eq 0 ] ; then
    printf 2>&1 'stbl: Need a filename\n'
    exit 2
fi
for fn ; do
    ed -s -- "$fn" <<'EOF'
$g/^ *$/d
w
EOF
done