Sure. Below is an example where the filename is not found. In this case i'd like to be able to capture an error and know that it failed.
perl -i.bak -pe 's/AJZ/AZZ/g if /^AB/' J_BB@ Can't open J_BB@: No such file or directory. echo $? 0
In reply to Re^2: Capture error from one-liner
by dirtdog
in thread Capture error from one-liner
by dirtdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |