询问下linux bash编程的问题
ee=`find . -name 'testscripts' -print`
echo $ee
if [ -f $ee ]; then
echo "find"
fi
假如没有名为 testscripts的文件,为什么依旧可以打印出"find"?
linux bug?
将if [ -f $ee ]改为 if [ -z $ee ]就ok了...
还是自己解决了...
相关问答:
写了个测试程序如下
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
大家好,本人目前刚刚接触Linux。现在公司的项目需要缩减Linux的Kernel和APP部分的Code Size。目前我们使用的是Linux2.6.22.15版本,应用于ADSL Modem(家庭网关)。
1.我们产品应用是ADSL Gateway,Kernel部 ......
不知道是什么原因,我该如何处理,请大虾们指教了,小弟在此谢过。。。。
错误信息如下:
The program being debugged was signaled while in a function called from GDB.
GDB has restored the context t ......
是这样的,近段在WINDOWS上上网时总是有病毒,我不习惯装杀毒软件,以前也一直没装过,觉得麻烦。然后就硬盘安装了LINUX,还好,可以上网,可以查东西。但是我是在WINDOWS下做软件开发的,还想装上WINDOWS,不知道能 ......