简体   繁体   中英

What does this line mean in bash scripting?

This is the line I am confused with.

while (! -e $1/$2)

What does it mean?

It strongly looks like tcsh syntax and not bash . If it is supposed to be bash , the syntax is incorrect.

On the other hand if it is tcsh , the line is looping while the file defined by those two arguments $1 and $2 does not exist (perhaps $1 defines a folder and $2 defines a file or something similar).

-e checks the existence of a file. Source: http://www.tcsh.org/tcsh.html/File_inquiry_operators.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM