fixalgorithms 443 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env sh
  2. #
  3. # fixciphers - remove unsupported ciphers from man pages.
  4. # Usage: fixpaths /path/to/sed cipher1 [cipher2] <infile >outfile
  5. #
  6. # Author: Darren Tucker (dtucker at zip com.au). Placed in the public domain.
  7. die()
  8. {
  9. printf '%s\n' "${*}"
  10. exit 1
  11. }
  12. SED=$1
  13. shift
  14. for c in ${*}; do
  15. subs="$subs -e /.Dq.$c.*$/d"
  16. subs="$subs -e s/$c,//g"
  17. done
  18. # now remove any entirely empty lines
  19. subs="$subs -e /^$/d"
  20. ${SED} $subs
  21. exit 0