Bu yapıyı senaryolarda çok gördüm ve kendim kullandım, ancak dokümantasyonda bulamadığımı rahatsız ediyor beni.
Örnek:
[ -f file1 ] &&
[ -f file2 ] &&
echo "Both files exist." ||
echo "One or the other file doesn't exist."
Bu, aşağıdaki gibi, newlines'tan önce ters eğik çizgi ile de yapılabilir man bash:
If a \<newline> pair appears, and the backslash is not
itself quoted, the \<newline> is treated as a line continuation (that
is, it is removed from the input stream and effectively ignored).
Örnek:
[ -f file1 ] && \
[ -f file2 ] && \
echo "Both files exist." || \
echo "One or the other file doesn't exist."
... ama bu gerekli görünmüyor. Yukarıdaki ilk sürüm ters eğik çizgi olmadan bile çalışır.
Bunu nerede bulabilirim man bash? (Ayrıca, bu bashbelirli mi yoksa POSIX uyumlu mu?)
@ G-Man, sanırım bu bana yönelik değildi? Sadece gelecekteki okuyucular için mi? Soruda söylediğim gibi, "onu belgelerde bulamamış olmam beni rahatsız ediyor." Nasıl çalıştığını zaten biliyordum, bu yüzden bu sadece resmi belgeler için bir talepti. :)
—
Wildcard
;,&,(ve).