0

when i try to run the below;

find /tmp/PDraw.pl -type f -exec sed -l 's/PEntries/PEntries2/g'{}\;

i get the error "find: missing argument to `-exec'"; I've also tried some posts suggestions to put space between ' and {} and also another between {} and \ but that brings me to another error;

sed: -e expression #1, char 7: extra characters after command

my sed version is 4.2.1; This same command ran successfully on another Linux machine. I dont know why its not working now.

4

2 回答 2

1

您在 {}\; 之前忘记了一个空格

于 2012-10-02T08:26:46.033 回答
0

解决find问题后(请参阅 Dorin 的回答),您需要对sed调用进行排序。从我的sed(v4.2.1):

 -l N, --line-length=N

这表明 -l 采用数字参数。如果我接受您的sed调用并使用数字参数进行修改,则不会出现上述错误。你确定这在你的另一台机器上有效(你运行正确sed吗?)

于 2012-10-02T08:29:36.493 回答