Outils pour utilisateurs

Outils du site


shell:conditions

Les conditions en Shell

Introduction

Les conditions souvent utilisées en Shell, que l'on oublie tout le temps.

Les fichiers

  • -d FILE

FILE exists and is a directory

  • -e FILE

FILE exists

  • -f FILE

FILE exists and is a regular file

  • -h FILE

FILE exists and is a symbolic link (same as -L)

  • -r FILE

FILE exists and is readable

  • -s FILE

FILE exists and has a size greater than zero

  • -w FILE

FILE exists and is writable

  • -x FILE

FILE exists and is executable

Les chaînes

  • -z STRING

the length of STRING is zero

shell/conditions.txt · Dernière modification: 2015/04/02 15:39 par Arthur Hoaro