1

I am using the information I found on this post

Perl: add character to begin of a line

to create this perl command (I need to add a |1 to the end of each string)

perl -p -e 's/$/|1/' C:\Users\Leslie\TABLE0212201314402-out.csv > C:\Users\Leslie\new.csv

and I get the error:

'1' is not recognized as an internal or external command, operable program or batch file

Do I need to do something to my |1 so that it works? Thanks, Leslie

4

1 回答 1

3

试试这个:

perl -p -e "s/$/|1/" C:\Users\Leslie\TABLE0212201314402-out.csv > C:\Users\Leslie\new.csv

请注意在 Windows 命令 shell 中使用双引号而不是单引号。

于 2013-02-27T17:01:53.373 回答