#!/usr/bin/gawk -f #/* vim: set filteype=awk : */ -*- awk -*- BEGIN{ while(getline < "testtree3.out") { lastline = $0 } # gsub(/^[.\/]*\//,"",lastline) split(lastline,a, ".") lastline = a[1] ".err." a[2]; # print lastline comm = "emacs " lastline "&" system(comm) # print lastline }