-n
在if [ -n "${TEMP_FILE_LIST}" ]
這個shell腳本中做了什麼?
5
A
回答
15
從help test
:
-n STRING
STRING True if string is not empty.
5
對於非零長度字符串-n測試
4
if [ -n "${TEMP_FILE_LIST}" ]
測試如果參數"${TEMP_FILE_LIST}"
沒有長度爲零。
您還可以檢查
if [ ! -z "${TEMP_FILE_LIST}" ]
相關問題
- 1. 在Python中,[-n:]做什麼?
- 2. if(xxx || xxx),我做錯了什麼?
- 3. 這個if語句做了什麼?
- 4. 「+」在CSS中做了什麼?
- 5. %%在printf中做了什麼?
- 6. *在CSS中做了什麼?
- 7. 「if(1)」做什麼?
- 8. if [[x]!= x]在bash中做什麼?
- 9. C中「if(n/10)」是什麼意思?
- 10. class_initialize()做了什麼?
- 11. 什麼是 「$(NO_EXPORT:+ - N」 做
- 12. 爲什麼〜N在做 - (N + 1)在JavaScript中?
- 13. perl中的~~做了什麼?
- 14. scalaz中scalaz.syntax.std.OptionOps.cata做了什麼?
- 15. 我在這裏做錯了什麼? IF和其他語句
- 16. 我在做什麼錯了?
- 17. select {}做了什麼?
- 18. while循環做了什麼?
- 19. L做了什麼?
- 20. logging.basicConfig做了什麼?
- 21. `tf.strided_slice()`做了什麼?
- 22. 什麼做錯了?
- 23. @synchronized()做了什麼?
- 24. log4net:我做錯了什麼?
- 25. 「..」在Meteor Spacebars聲明中做了什麼?
- 26. 「navbar-header」類在Bootstrap中做了什麼?
- 27. apc.preload_path在APC設置中做了什麼?
- 28. 'el'在view.render()中做了什麼?el?
- 29. rootmodifers在famo.us中做了什麼?
- 30. --stdlayout在git svn clone中做了什麼?
什麼-z? :S –
@ChinBoon,請參閱http://stackoverflow.com/questions/7629201/what-is-z-in-if-z-file-list – imm