什么-b在bash中意味着什么

前端之家收集整理的这篇文章主要介绍了什么-b在bash中意味着什么前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在看如何使用 runit to run gunicorn.我正在查看bash文件,我不知道-f $PID在做什么
  1. #!/bin/sh
  2.  
  3. GUNICORN=/usr/local/bin/gunicorn
  4. ROOT=/path/to/project
  5. PID=/var/run/gunicorn.pid
  6.  
  7. APP=main:application
  8.  
  9. if [ -f $PID ]; then rm $PID; fi
  10.  
  11. cd $ROOT
  12. exec $GUNICORN -c $ROOT/gunicorn.conf.py --pid=$PID $APP

谷歌在这种情况下毫无用处,因为搜索标志是没用的

Google is useless in this case because searching for flags is useless

幸运的是,Bash参考手册可以在线获取,时间是http://www.gnu.org/software/bash/manual/bashref.html.这是谷歌第一次使用“Bash手册”. §6.4 “Bash Conditional Expressions”说:

-f file

True if file exists and is a regular file.

猜你在找的Bash相关文章