Cosa succede se [-f file]; significare?


0

Ho un'istruzione if in un file bash:

if [ -f bin/post_compile ]; then
    echo "-----> Running post-compile hook"
    chmod +x bin/post_compile
    sub-env bin/post_compile
fi

cosa -fsignifica?


1
help test | grep -- -f
Ciro,

[something]è equivalente a test something. Come dice @Cyrus, cerca testdigitando help test.
ctrl-alt-delor,

Perché il voto negativo, la domanda è chiara. Può darsi che pensiamo che la risposta sia ovvia, ma non dovremmo votare in basso per essere "stupidi" (non sapendo).
ctrl-alt-delor,

Risposte:


Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.