数值用字母命令,字符串比较用数学符号
整数比较
-eq 等于,如:if [ “$a” -eq “$b” ]
继续阅读“Shell 比较大小”
xuenhua’s 站点
Shell在编程方面比Windows批处理强大很多,无论是在循环、运算。
继续阅读“Shell 数组”cat /proc/version
lsb_release -a
centos
cat /etc/redhat-release
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
在linux下面的大型工程很多都是makefile管理的,但是随着工程越来越大,makefile编写又成了一个大工程,这个时候出现了两个比较流行的工具,cmake和configure,configure又衍生出来一套automake。
继续阅读“autogen.sh 的使用”错误:
[root@localhost]# mount -t nfs 192.168.0.106:/home/nfs1 /home/nfs
mount: wrong fs type, bad option, bad superblock on 192.168.0.106:/home/nfs1,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog – try
dmesg | tail or so
解决办法:
1 apt-get install nfs-common
或者
1 yum install nfs-utils