相同参数和相同命令的Unix命令状态不同

时间:2018-09-24 16:00:12

标签: shell

下面是我连续尝试的命令集。但是$?每次返回不同的值,

:~/workspace/bitbucket_copy/linuximage$ pkg-config --cflags --libs libcurl-dev
Package libcurl-dev was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl-dev.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl-dev' found

:~/workspace/bitbucket_copy/linuximage$ pkg-config --cflags --libs libcurl-dev | echo $?
1
Package libcurl-dev was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl-dev.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl-dev' found

:~/workspace/bitbucket_copy/linuximage$ pkg-config --cflags --libs libcurl-dev | echo $?
0
Package libcurl-dev was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl-dev.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl-dev' found

0 个答案:

没有答案