ChinaUnix.net
相关文章推荐:

expected specifierqualifierlist

我用 if [ $i -eq 100 ] 就出现了这个错误:integer expression expected 从字面上理解就是变量i应该是个integer类型的 但是如何把一个字符型数字转换成整形呢?

by cuer_2 - Shell - 2009-06-01 16:21:21 阅读(13981) 回复(11)

相关讨论

以下是port.sh的内容 #! /bin/bash # program: Using to study the [if... then ...fi] program # Written by :Beyond # date: 2007/06/15 # content: I will be using this program to show your services # 1. print the program's work in your screen echo "Now, the services of your Linux system will be detect!" echo "The www, ftp, ssh, and sendmail + pop3 will be detect!" echo " " # 2. www www='netstat ...

by beyond911 - Shell - 2007-06-17 13:35:31 阅读(14979) 回复(2)

(原标题为:求解:一个菜鸟编程中的问题!) 编写了一个shell命令cp 代码如下: #include #include #include #include #define maxOnce 1024 int main(int argc,char * argv[]) { int fdsrc,fddist; char buf[maxOnce]; char buf1[maxOnce]; int size; if(argc!=3) printf("error for input\n"); if((fdsrc=open(argv[1],O_RDONLY)==-1) perror("error for open\n ");//出错...

by melonmelon - C/C++ - 2006-12-28 20:35:32 阅读(4243) 回复(10)

原代码如下: fsmax="85" maillist1="[email]cold@163.com[/email]" maillist2="[email]hot@163.com[/email]" df -k | grep '/dev/h' | awk '{print $1,$5,$6}'>mailfile mail -s "Filesystem Information" $maillist1 < mailfile mail -s "Filesystem Information" $maillist2 < mailfile df -k | grep '/dev/h' | awk '{print $5}'>outfile while [ read fsvalue ] do fsvalue=$(echo $fsvalue | sed 's/\%//') ...

by wwmshe - Shell - 2006-05-17 14:13:03 阅读(1231) 回复(1)

代码情况比较复杂,不好说... 举例说吧,有三个文件 a.c a.h b.c,a.h中定义一个结构体,在另外两个文件都会用到,所以两个文件都include"a.h", a.h还声明了一些a.c中的函数,编译的时候就出现下面错误,这些错误就是在a.h里面的函数声明处, a.h中的结构体用了 typedef ,不知道这个有没有影响,因为看了一些文章,但是也没完全搞明白... 如果有人遇到过这个问题就最好了~~ In file included from detect.h:5, ...

by zuii - C/C++ - 2009-06-08 16:38:06 阅读(19069) 回复(5)

expected declaration or statement at end of input 是什么意思呀? 就着一个错在最后

by zhanglupanda - C/C++ - 2007-04-01 00:04:35 阅读(15816) 回复(5)

8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 #include 15 #include 16 #include 17 #include 18 #include 19 #include 20 #include 21 22 #define BUF_SIZE 256 23 #define PROJ_ID 32 71 72 int main() 73 { 74 75 ...

by cyg19860205 - C/C++ - 2009-05-11 18:26:50 阅读(29521) 回复(5)

#include int size(int num) {     char array[num+2];     return sizeof(array); } int main() {     printf("%d\n",size(4));     return(0);   } 为什么在vc里编译不过?

by lxbkey - C/C++ - 2008-08-02 11:59:25 阅读(8843) 回复(4)

#!/bin/sh count=2 while [ 0 ];do if [ $count%2 -eq 0 ];then date -s 12:12:00 fi if [ $count%2 -ne 0 ];then date -s 12:34:00 fi sleep 10 let count=$count+1 done 结果如下: ./changetime.sh: line 6: [: 2%2: integer expression expected ./changetime.sh: line 9: [: 2%2: integer expression expected 我又使用了"$count%2" 还是这个问题,点解?

by loveoov - Shell - 2007-10-26 17:40:38 阅读(8209) 回复(1)

VALID TAKEN :IS NOT NO NULL ALLOW FINAL READS C/EXEC SQL C+ CREATE FUNCTION GETRESPONSES(CODE VARCHAR(100),SUPERID INTEGER) C+ RETURN TABLE(CODE VARCHAR(100), SUPERID INTEGER, C+ POSTID INTEGER,TITLE VARCHAR(100), TEXT VARCHAR(1000)) C+ READS SQL DATA DETERMINISTIC NO EXTERNAL ACTION C+ RETURN SELECT...

by allatony - AS400 - 2007-01-04 20:49:44 阅读(1913) 回复(0)

我的程序如下: NUM=`awk '/NUM/{sub(/NUM=/,"");print}' $DIR/logzdm.ini` processID=1 while [ $processID -le $NUM ]; do values=DEBUGLOG${processID}= process_content=`grep $values $DIR/logzdm.ini | awk -F= '{print $2}'` ; echo $process_content | sed 's/\"\"*//g' ; processID=`expr $processID + 1`; done logzdm.ini 文件内容: #プロセスの件数 NUM=12 ------------------NUM 数每次都可能变化,并且...

by twanger - Shell - 2006-05-29 15:30:56 阅读(7851) 回复(10)