Salvatore Bonaccorso <car...@debian.org> writes: > If you have a fixed. Something like the following should work for DLA's > then: > > ( head -n 4 $1; tail -n +5 $1 | gpg --clearsign ) > $1.signed
How about we look for the first empty line instead? Index: bin/sign-advisory.sh =================================================================== --- bin/sign-advisory.sh (revision 45391) +++ bin/sign-advisory.sh (working copy) @@ -47,7 +47,7 @@ signed_dsa=${dsa}.signed # figure out the offset for actual DSA text, after headers -n=$(awk '/^-+/ {print NR ; exit}' $dsa) +n=$(awk '/^$/ {print NR+1 ; exit}' $dsa) # keep headers, and sign the content { head -n $(($n - 1)) $dsa ; tail -n +$n $dsa | gpg --clearsign ; } >| $signed_dsa -- Brian May <b...@debian.org>