什麼意思是!
,$0
和return 1
在這裏?exclamation'!'是什麼意思?在shell腳本中?
-2
A
回答
3
這意味着如果/home/pp/
是不(!
)一個目錄(-d
),則腳本將打印Directory doesn't exist
和退出時1,這意味着誤差
(任何0以外出口裝置錯誤)
和$0
意味着腳本名 例如
./script a b c
$0 will print 'script'
$1 will print 'a'
$2 will print 'b'
$3 will print 'c'
2
- !不
- $ 0是拿着腳本的名稱
- 回報1是通過調用程序解釋的返回碼的說法。 1表示 錯誤。
2
它有一個類似於它在C中的含義:「不」或邏輯否定。在這種情況下,您可以將其解析爲僞代碼,如not(directory-exists(/home/pp))
。
相關問題
- 1. 在shell腳本中,。[!。] *是什麼意思?
- 2. shell腳本中的##是什麼意思
- 3. 是什麼意思〜在unix Shell腳本
- 4. Shell腳本:shell腳本中的-z是什麼意思?
- 5. '$?'是什麼意思是在shell腳本中?
- 6. 在Linux shell腳本中,'x = $ {1:3:1}'是什麼意思?
- 7. 在UNIX shell腳本中,「#!/ bin/sh」是什麼意思?
- 8. 這是什麼意思SCRIPTNAME =「$ {0 ## * /}」在shell腳本中?`
- 9. 在sh/Bash shell腳本中,##(bang-pound)是什麼意思?
- 10. 在shell腳本表達式中,「plus colon」(「+:」)是什麼意思?
- 11. 這行「BUILD_TARGET = $ {1:-none}」是什麼意思在shell腳本中?
- 12. shell腳本 - 這是什麼日期表達的意思是
- 13. 這個shell腳本代碼行是什麼意思
- 14. 這個shell腳本代碼是什麼意思
- 15. - @前面的shell腳本,這是什麼意思
- 16. shell中的$ {}是什麼意思?
- 17. 什麼意思 - 在bash腳本中?
- 18. 這個bash腳本是什麼意思
- 19. perf腳本輸出是什麼意思?
- 20. 「無效腳本」是什麼意思?
- 21. Bash腳本:#!/ bin/bash是什麼意思?
- 22. 這個腳本是什麼意思
- 23. 是什麼$?在shell腳本中意味着什麼?
- 24. 是什麼意思:是什麼意思?
- 25. Perl腳本中的「不在某些shell下運行」是什麼意思?
- 26. 在shell腳本中,> 1 ../log/ orientdb.log和1 >> ../ log/orientdb.log是什麼意思?
- 27. 這個shell語句是什麼意思?
- 28. 是什麼意思,在Python中是什麼意思?
- 29. Shell腳本:什麼意思/表達式 - 讀取void void VARIABLE void?
- 30. 什麼是=>在我的bash腳本中的意思
$ 0是腳本名稱,$ 1是第一個模式。 – cforbish
謝謝我忘了:D –