瘋狂帽客's Blog
You are already naked. There is no reason not to follow your heart. ~ Steve Jobs ~
Monday, December 04, 2006
有趣的語法
somecmd && {
cmd1
cmd2
cmd3
}
這樣可能看不太懂吧!如果改成這樣呢?
test -f /etc/issue && {
cat /etc/issue
}
如果還不能了解的話,請往下看:
if [ -f /etc/issue ]; then
cat /etc/issue
fi
有趣吧 =)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment