• [^] # Re: coomand ?

    Posté par . En réponse au message traitement lot / compresser pdf. Évalué à 3.

    A quoi sert "command" dans le cas de ce script ?

    Ça sert (en théorie) à être sûr que tu vas appeler la commande qui suit et non pas une hypothétique fonction du shell qui porterait le même nom. Bon, ici, l'utilité ne me saute pas aux yeux, mais ça ne veut pas dire qu'elle n'existe pas :)

    Sinon, un help command renseigne sur command (qui est un utilitaire POSIX) :

    $ help command
    command: command [-pVv] command [arg ...]
     Runs COMMAND with ARGS ignoring shell functions. If you have a shell
     function called `ls', and you wish to call the command `ls', you can
     say "command ls". If the -p option is given, a default value is used
     for PATH that is guaranteed to find all of the standard utilities. If
     the -V or -v option is given, a string is printed describing COMMAND.
     The -V option produces a more verbose description.