in reply to Re^2: Capture error from one-liner
in thread Capture error from one-liner

not an expert of korn-shell, but what you want is capturing STDERR.

If there is no direct way to do it, but you could redirect STDERR to STDOUT and capture STDOUT.

No idea if you need backticks° in ksh then!¹

(I would do the whole task completely within Perl not in ksh²)

HTH (otherwise others will know =)

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)

updates

°) ksh seems to support $() for backticks

¹) normally errors are piped into a file like here, bash can use backticks to capture STDOUT

²) should be mentioned that this is not a Perl question!