skip to main
|
skip to sidebar
Fedora已死(理想主义的光辉瞬间湮灭)-To be continued
Fedora笔记, BIOS笔记, 还有一些牢骚
20101014
Bash: checking if a variable is a number
[code]
# v=1
# [ $v -eq $v ]
# echo $?
0
# v=a
# [ $v -eq $v ]
# echo $?
2
[/code]
Note: "-eq" compares number, but not string.
Ref:
http://snippets.dzone.com/posts/show/3143
0 评论:
发表评论
较新的帖子
较早的帖子
主页
订阅:
帖子评论 (Atom)
标签
ACPI
(5)
aMule
(1)
android
(1)
ANTLR
(1)
Apache
(6)
apt
(1)
backup
(6)
BIOS
(8)
browser
(4)
c
(8)
CSS
(1)
debian
(1)
DOS
(2)
drupal
(1)
e17
(1)
eclipse
(2)
ems
(1)
Excel
(1)
extjs
(2)
Fedora
(14)
filesystem
(1)
Firefox
(12)
FVWM
(1)
gfw
(3)
GNU
(2)
Google
(8)
hacker
(3)
hardware
(2)
HTML
(2)
IE
(1)
Javascript
(5)
js
(4)
Linux
(34)
linux tips
(1)
locale
(1)
man
(1)
MASM
(11)
Matlab
(1)
mobile phone
(2)
mother board
(4)
music
(1)
mysql
(1)
network
(6)
opensource
(9)
PHP
(8)
rpm
(1)
Shell
(2)
SVN
(11)
tips
(3)
ubuntu
(6)
UltraEdit
(2)
Ununtu
(6)
vbox
(1)
vim
(2)
web
(1)
website
(4)
Windows
(8)
牢骚
(11)
广告位
0 评论:
发表评论