in reply to oneliner: autorun script when I save it in the editor
Nice one! I modified it a bit to compile and run a C program:
perl -E 'while(-f $ARGV[1]){ $now=(stat(_))[9]; system("@ARGV"), print + "-" x 80, "\n" if ($now-$prev); $prev=$now; sleep 1 }' gcc a.c \&\& +./a.out
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: oneliner: autorun script when I save it in the editor
by FreeBeerReekingMonk (Deacon) on Apr 02, 2017 at 17:43 UTC |