#!/bin/sh AWK=`find / -name awk | tail -1` #old awk /mounts/instsys/bin/awk -f cat >/tmp/bar.awk </tmp/foo.awk < 0) # print \$0 |& ns # print "EOO" |& ns # close(output) # } if(\$1 == "screendump") { output = "chvt " \$2 ";cat /dev/vcs" while((output | getline) > 0) print \$0 |& ns close(output) } if(\$1 == "stat") { while((getline < "/target/var/log/installer/syslog") > 0) { line = \$0 } close("/target/var/log/installer/syslog") if(line ~ /Unpacking/) { sub(/\.[^\.]+\.deb .*$/,"",line) sub(/^.* /,"",line) } if( (line ~ /Installing/) (line ~ /Selecting/) or (line ~ /Setting\ up/)) { sub(/\.[^\.]+\.deb .*$/,"",line) sub(/^.* /,"",line) } else { line = "prep" } print ("installing " line) |& ns } close(ns) } } EOF chmod 755 /tmp/foo.awk chmod 755 /tmp/bar.awk /tmp/bar.awk & /tmp/foo.awk >/tmp/foo.log 2>&1 &