URI: 
       0024-ed.sh - sbase - suckless unix tools
  HTML git clone git://git.suckless.org/sbase
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       0024-ed.sh (410B)
       ---
            1 #!/bin/sh
            2 
            3 tmp=tmp.$$
            4 
            5 trap 'rm -f $tmp' EXIT
            6 trap 'rm -f $tmp; kill -KILL $$' HUP INT TERM
            7 
            8 cat <<EOF > $tmp
            9 static int radix = 16;
           10 static int Pflag;
           11 static int Aflag;
           12 static int vflag;
           13 static int gflag;
           14 static int uflag;
           15 static int arflag;
           16 
           17 EOF
           18 
           19 ed -s /dev/null <<EOF | diff -u $tmp -
           20 a
           21 int radix = 16;
           22 int Pflag;
           23 int Aflag;
           24 int vflag;
           25 int gflag;
           26 int uflag;
           27 int arflag;
           28 
           29 .
           30 ?radix?;/^$/-s/^/static /
           31 ,p
           32 Q
           33 EOF