Perl One Liner: "Не удается найти терминатор строки"'"где-либо до EOF в строке -e 1"
Я знаю, что это просто, но я не могу добраться до корня. Я получаю сообщение об ошибке, и я не могу расшифровать основную причину этого в этом простом вкладыше. Я использую Windows 7 с Strawberry Perl 5.18.2.1-32bit.
Программа 1: для нумерации только непустой строки
perl -pe '$_ = ++$a." $_ " if / ./' config01.log
Выход:
Can't find string terminator "'" anywhere before EOF at -e line 1.
Программа 2: для нумерации только всей строки
perl -ne 'print "$. $_"' config01.log
Выход:
Can't find string terminator "'" anywhere before EOF at -e line 1.
Образец журнала используется:
cat config01.log
processx>#process processx
processx>
processx>
*** ERROR from SQL [-9204]: Unable to access volume \XTAB.$VOL08.
*** ERROR from File System [66]: device downed, LIU not yet downloaded, or hard
*** failure occurred on controller, or disk and controller incompatible
*** (dp1/dp2)
processx>==== Previous tests used GOOG as sub volume for MX Reportwriter Tests ====
processx>cleanup !$*.GOOG.*,catalogs;
SQL Table \XTAB.$VOL03.GOOG.EMP catalog entry has been removed.
SQL Table \XTAB.$VOL03.GOOG.EMP file label has been purged.
SQL Table \XTAB.$VOL03.GOOG.TAB3 catalog entry has been removed.