|
|
1.1 ! root 1: #! /bin/sh ! 2: # set -x ! 3: # trget: convert files for troff so troff doesn't tizzify ! 4: PATH=/bin:/usr/bin ! 5: s1="s/\\\\/\\\\e/g" ! 6: s2="s/^/\\\\\\&/" ! 7: case $# in ! 8: [01]) echo usage trget nargs input line1 line2 exitline 1>&2; exit 1 ! 9: esac ! 10: case "$1" in ! 11: 2) cmd="-e '$s1' -e '$s2'";; ! 12: 3) cmd="-n -e '$s1' -e '$s2' -e '$3{;p;q;}'" ;; ! 13: 4) cmd="-n -e '$3,$4{;$s1;$s2;p;}'" ;; ! 14: *) cmd="-n -e '$5{;$s1;$s2;p;q;}' -e '$3,$4{;$s1;$s2;p;}'" ;; ! 15: esac ! 16: (eval sed $cmd) < $2
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.