【发布时间】:2011-05-11 06:21:54
【问题描述】:
我下面有一个非常简单的程序。
#include<stdio.h>
void main(int argc, char *argv[])
{
printf("\n %s",argv[3]);
}
假设可执行文件名为 a.out 并以 $./a.out 的形式运行它 open path/to/my/file O_WRONLY|O_APPEND 给 Command no found 错误。 在哪里运行它就像运行它一样 $./a.out open path/to/my/file O_WRONLY 给出输出 O_WRONLY。
是因为|
感谢您宝贵的时间。
【问题讨论】:
-
像这样转义:
./a.out open path/to/my/file O_WRONLY\|O_APPEND或者甚至像这样尝试:./a.out open path/to/my/file O_WRONLY'|'O_APPEND