• # printf

    Posté par . En réponse au message Bash, ksh, POSIX et compatibilité. Évalué à 2.

    Pourquoi l'utilisation de printf n'est elle pas possible ?

    Je n'ai pas d'AIX sous la main pour tester mais sous linux un script avec les lignes suivantes affiche correctement le texte sous bash :

    #!/bin/sh
    export HELP="\n\
    ### check_files.sh #####################################################################\n\
    # #\n\
    # Checks if presence of files in a directory on AIX. #\n\
    # #\n\
    # Arguments : #\n\
    # #\n\
    # -d <path> Directory to search files in. #\n\
    # -a <int> Search files older than this parameter, in minutes. #\n\
    # -s <int> Size of each file must be superior to this value, in bytes #\n\
    # -n <int> Maximum number of files #\n\
    # -h Show this help. #\n\
    # #\n\
    ########################################################################################\n\
    \n";
    printf "$HELP"