cat2014 susspected correct. I ran the following test on my machine (Solaris 7) :
/usr/sbin/ufsdump 0uf /bar /foo
i got output, and aborted with Ctrl+C
Then, i tried the following :
/usr/sbin/ufsdump 0uf /bar /foo 2> stderr.out
Nothing printed to screen, aborted with Ctrl+C
This proves that ufsdump writes to STDERR, not STDOUT. There are two fixes.
- You could add 2>&1 to the end of your command line. This would re-direct STDERR into STDOUT, and the backticks would work.
- You could fork off a child, and re-open STDERR to point to STDOUT, then exec the process. A bit longer method, but does not require the use of a shell (which is non-portable ... not that ufsdump for Win32 is really there.)
$ perl -e 'do() || ! do() ;'
Undefined subroutine &main::try