IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Shell et commandes GNU Discussion :

Shell scripting & PHP (échapper variable)


Sujet :

Shell et commandes GNU

  1. #1
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2013
    Messages
    38
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Juillet 2013
    Messages : 38
    Par défaut Shell scripting & PHP (échapper variable)
    Bonjour,

    Dans mon post précédent j'avais un autre problème avec un fichier php dans mon Shell script.
    Comme le script détecte me donne donc je dois faire cela exacte ? j'ai fait cela avec mon fichier et le résulta négatifs les variables semble présente mais, le logiciel non fonctionnel ...

    Voila mon fichier que je doit copier avec
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    echo "blablabla" >> fichier
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    <?php
    	// configuration parameters
     
    	// for snoopy client
    	@define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0', true);
    	@define('HTTP_TIME_OUT', 30, true);	// in seconds
    	@define('HTTP_USE_GZIP', true, true);
    	$httpIP = null;				// IP string. Or null for any.
     
    	@define('RPC_TIME_OUT', 5, true);	// in seconds
     
    	@define('LOG_RPC_CALLS', false, true);
    	@define('LOG_RPC_FAULTS', true, true);
     
    	// for php
    	@define('PHP_USE_GZIP', false, true);
    	@define('PHP_GZIP_LEVEL', 2, true);
     
    	\$do_diagnostic = true;
    	\$log_file = '/tmp/rutorrent_errors.log';		// path to log file (comment or leave blank to disable logging)
     
    	\$saveUploadedTorrents = true;		// Save uploaded torrents to profile/torrents directory or not
    	\$overwriteUploadedTorrents = false;     // Overwrite existing uploaded torrents in profile/torrents directory or make unique name
     
    	\$topDirectory = '/home';			// Upper available directory. Absolute path with trail slash.
    	\$forbidUserSettings = false;
     
    	\$scgi_port = 5000;
    	\$scgi_host = \"127.0.0.1\";
     
    	// For web->rtorrent link through unix domain socket
    	// (scgi_local in rtorrent conf file), change variables
    	// above to something like this:
    	//
        //\$scgi_port = 0;
    	//\$scgi_host = \"unix:///tmp/rtorrent.sock\";
     
    	\$XMLRPCMountPoint = "/RPC2";		// DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
     
    	\$pathToExternals = array(
    		\"php\"  => '/usr/bin/php',			// Something like /usr/bin/php. If empty, will be found in PATH.
    		\"curl\" => '/usr/bin/curl',			// Something like /usr/bin/curl. If empty, will be found in PATH.
    		\"gzip\" => '/bin/gzip',			// Something like /usr/bin/gzip. If empty, will be found in PATH.
    		\"id\"   => '/usr/bin/id',			// Something like /usr/bin/id. If empty, will be found in PATH.
    		\"stat\" => '/usr/bin/stat',			// Something like /usr/bin/stat. If empty, will be found in PATH.
    	);
     
    	\$localhosts = array( 			// list of local interfaces
    		"127.0.0.1",
    		"localhost",
    	);
     
    	\$profilePath = '../share';		// Path to user profiles
    	\$profileMask = 0777;			// Mask for files and directory creation in user profiles.
    						// Both Webserver and rtorrent users must have read-write access to it.
    						// For example, if Webserver and rtorrent users are in the same group then the value may be 0770.
     
    ?>
    Je ne trouve pas d'autre solution
    merci

  2. #2
    Modérateur
    Avatar de N_BaH
    Profil pro
    Inscrit en
    Février 2008
    Messages
    7 646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 7 646
    Par défaut
    Bonjour,

    mon post précéden
    lequel ?

    un peu de contexte, stp.

    EDIT:
    le PHP, ok.
    et le script shell ?
    N'oubliez pas de consulter les cours shell, la FAQ, et les pages man.

  3. #3
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2013
    Messages
    38
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Juillet 2013
    Messages : 38
    Par défaut
    Mon poste Précédent

    http://www.developpez.net/forums/d13...r/#post7453264

    en fais j'ai refait le post parce que c'est tes pas le même sujet que le poste d'origine

    en fais j'ai un fichier configuration php a copier avec mon shell script et cela me cause problème comme cité plu haut

  4. #4
    Modérateur
    Avatar de N_BaH
    Profil pro
    Inscrit en
    Février 2008
    Messages
    7 646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 7 646
    Par défaut
    utilise plutôt cat plutôt qu'une variable :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    cat <<'eof' >fichier2conf
    <?php
       // configuration parameters
     
       // for snoopy client
       @define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0', true);
       @define('HTTP_TIME_OUT', 30, true); // in seconds
       @define('HTTP_USE_GZIP', true, true);
       $httpIP = null;            // IP string. Or null for any.
     
       @define('RPC_TIME_OUT', 5, true);   // in seconds
     
       @define('LOG_RPC_CALLS', false, true);
       @define('LOG_RPC_FAULTS', true, true);
     
       // for php
       @define('PHP_USE_GZIP', false, true);
       @define('PHP_GZIP_LEVEL', 2, true);
     
       $do_diagnostic = true;
       $log_file = '/tmp/rutorrent_errors.log';    // path to log file (comment or leave blank to disable logging)
     
       $saveUploadedTorrents = true;      // Save uploaded torrents to profile/torrents directory or not
       $overwriteUploadedTorrents = false;     // Overwrite existing uploaded torrents in profile/torrents directory or make unique name
     
       $topDirectory = '/home';        // Upper available directory. Absolute path with trail slash.
       $forbidUserSettings = false;
     
       $scgi_port = 5000;
       $scgi_host = \"127.0.0.1\";
     
       // For web->rtorrent link through unix domain socket
       // (scgi_local in rtorrent conf file), change variables
       // above to something like this:
       //
        //$scgi_port = 0;
       //$scgi_host = \"unix:///tmp/rtorrent.sock\";
     
       $XMLRPCMountPoint = "/RPC2";    // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
     
       $pathToExternals = array(
          \"php\"  => '/usr/bin/php',         // Something like /usr/bin/php. If empty, will be found in PATH.
          \"curl\" => '/usr/bin/curl',        // Something like /usr/bin/curl. If empty, will be found in PATH.
          \"gzip\" => '/bin/gzip',         // Something like /usr/bin/gzip. If empty, will be found in PATH.
          \"id\"   => '/usr/bin/id',       // Something like /usr/bin/id. If empty, will be found in PATH.
          \"stat\" => '/usr/bin/stat',        // Something like /usr/bin/stat. If empty, will be found in PATH.
       );
     
       $localhosts = array(         // list of local interfaces
          "127.0.0.1",
          "localhost",
       );
     
       $profilePath = '../share';      // Path to user profiles
       $profileMask = 0777;         // Mask for files and directory creation in user profiles.
                      // Both Webserver and rtorrent users must have read-write access to it.
                      // For example, if Webserver and rtorrent users are in the same group then the value may be 0770.
     
    ?>
    eof
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    $ cat fichier2conf
    <?php
       // configuration parameters
     
       // for snoopy client
       @define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0', true);
       @define('HTTP_TIME_OUT', 30, true); // in seconds
       @define('HTTP_USE_GZIP', true, true);
       $httpIP = null;            // IP string. Or null for any.
     
       @define('RPC_TIME_OUT', 5, true);   // in seconds
     
       @define('LOG_RPC_CALLS', false, true);
       @define('LOG_RPC_FAULTS', true, true);
     
       // for php
       @define('PHP_USE_GZIP', false, true);
       @define('PHP_GZIP_LEVEL', 2, true);
     
       $do_diagnostic = true;
       $log_file = '/tmp/rutorrent_errors.log';    // path to log file (comment or leave blank to disable logging)
     
       $saveUploadedTorrents = true;      // Save uploaded torrents to profile/torrents directory or not
       $overwriteUploadedTorrents = false;     // Overwrite existing uploaded torrents in profile/torrents directory or make unique name
     
       $topDirectory = '/home';        // Upper available directory. Absolute path with trail slash.
       $forbidUserSettings = false;
     
       $scgi_port = 5000;
       $scgi_host = \"127.0.0.1\";
     
       // For web->rtorrent link through unix domain socket
       // (scgi_local in rtorrent conf file), change variables
       // above to something like this:
       //
        //$scgi_port = 0;
       //$scgi_host = \"unix:///tmp/rtorrent.sock\";
     
       $XMLRPCMountPoint = "/RPC2";    // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
     
       $pathToExternals = array(
          \"php\"  => '/usr/bin/php',         // Something like /usr/bin/php. If empty, will be found in PATH.
          \"curl\" => '/usr/bin/curl',        // Something like /usr/bin/curl. If empty, will be found in PATH.
          \"gzip\" => '/bin/gzip',         // Something like /usr/bin/gzip. If empty, will be found in PATH.
          \"id\"   => '/usr/bin/id',       // Something like /usr/bin/id. If empty, will be found in PATH.
          \"stat\" => '/usr/bin/stat',        // Something like /usr/bin/stat. If empty, will be found in PATH.
       );
     
       $localhosts = array(         // list of local interfaces
          "127.0.0.1",
          "localhost",
       );
     
       $profilePath = '../share';      // Path to user profiles
       $profileMask = 0777;         // Mask for files and directory creation in user profiles.
                      // Both Webserver and rtorrent users must have read-write access to it.
                      // For example, if Webserver and rtorrent users are in the same group then the value may be 0770.
     
    ?>
    du coup, pour les guillemets que tu as protégé, je ne sais pas s'il faut conserver les protetions
    ...
    ?
    N'oubliez pas de consulter les cours shell, la FAQ, et les pages man.

  5. #5
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2013
    Messages
    38
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Juillet 2013
    Messages : 38
    Par défaut
    je vais tester mais avec possible de écraser un fichier comme avec echo ?

  6. #6
    Modérateur
    Avatar de N_BaH
    Profil pro
    Inscrit en
    Février 2008
    Messages
    7 646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 7 646
    Par défaut
    j'ai édité mon message pour tenir compte de la redirection.
    N'oubliez pas de consulter les cours shell, la FAQ, et les pages man.

  7. #7
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2013
    Messages
    38
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Juillet 2013
    Messages : 38
    Par défaut
    désolé cela ne fonctionne pas ....

    les \ reste en place et cela ne fonctionne pas

  8. #8
    Modérateur
    Avatar de N_BaH
    Profil pro
    Inscrit en
    Février 2008
    Messages
    7 646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 7 646
    Par défaut
    Citation Envoyé par debdarky
    les \ reste en place
    où ça ?

    Citation Envoyé par N_BaH
    pour les guillemets que tu as protégé, je ne sais pas s'il faut conserver les protections
    je les ai laissées, peut-être ne faut-il pas
    ...
    ?
    N'oubliez pas de consulter les cours shell, la FAQ, et les pages man.

  9. #9
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2013
    Messages
    38
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Juillet 2013
    Messages : 38
    Par défaut
    j'ai re tester sans les \ mais sans résulta

    je doit dire une chose quand je recrée le fichier avec un simple copier coller cela fonctionne

    et tout ce que j'ai tester a échouer actuellement

    je trouve que cela commence a devenir complexe parce que il ne doit pas avoir d'intervention utilisateur avec le script

  10. #10
    Modérateur
    Avatar de N_BaH
    Profil pro
    Inscrit en
    Février 2008
    Messages
    7 646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 7 646
    Par défaut
    et quelles sont les différences entre les écritures ?
    fais un diff d'une sauvegarde d'un copier/coller qui fonctionne, et d'un "écrasement" qui ne fonctionne pas.
    N'oubliez pas de consulter les cours shell, la FAQ, et les pages man.

  11. #11
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2013
    Messages
    38
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Juillet 2013
    Messages : 38
    Par défaut
    Arrr loll

    je ne sais pas pourquoi sa fonctionne en fait j'ai recréer mais fichier de 0 a la place d'utiliser celui créer pour faire les test

    mais un dernier problème c'est pour cela que j'ai besoin de echo javais oublier
    de mentionner un détaille importent j'ai une variable que shell doit prendre en considération ( $user ) il est pas présent mais je doit l'ajouter a lendroit ou c'est écrie /home

    voila le diff avec echo

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    root@debian:/var/www/rutorrent/conf# diff config1.php config.php
    0a1
    >
    8c9
    <       $httpIP = null;                         // IP string. Or null for any.
    ---
    >        = null;                                // IP string. Or null for any.
    19,20c20,21
    <       $do_diagnostic = true;
    <       $log_file = '/tmp/rutorrent_errors.log';                // path to log file (comment or leave blank to disable logging)
    ---
    >        = true;
    >        = '/tmp/rutorrent_errors.log';         // path to log file (comment or leave blank to disable logging)
    22,23c23,24
    <       $saveUploadedTorrents = true;           // Save uploaded torrents to profile/torrents directory or not
    <       $overwriteUploadedTorrents = false;     // Overwrite existing uploaded torrents in profile/torrents directory or make unique name
    ---
    >        = true;                // Save uploaded torrents to profile/torrents directory or not
    >        = false;     // Overwrite existing uploaded torrents in profile/torrents directory or make unique name
    25,26c26,27
    <       $topDirectory = '/home';                        // Upper available directory. Absolute path with trail slash.
    <       $forbidUserSettings = false;
    ---
    >        = '/home//downloads';                  // Upper available directory. Absolute path with trail slash.
    >        = false;
    28,29c29,30
    <       $scgi_port = 5000;
    <       $scgi_host = "127.0.0.1";
    ---
    >        = 5000;
    >        = 127.0.0.1;
    35,36c36,37
    <     //$scgi_port = 0;
    <       //$scgi_host = "unix:///tmp/rtorrent.sock";
    ---
    >     // = 0;
    >       // = unix:///tmp/rtorrent.sock;
    38c39
    <       $XMLRPCMountPoint = "/RPC2";            // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
    ---
    >        = /RPC2;               // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
    40,45c41,46
    <       $pathToExternals = array(
    <               "php"  => '/usr/bin/php',                       // Something like /usr/bin/php. If empty, will be found in PATH.
    <               "curl" => '/usr/bin/curl',                      // Something like /usr/bin/curl. If empty, will be found in PATH.
    <               "gzip" => '/bin/gzip',                  // Something like /usr/bin/gzip. If empty, will be found in PATH.
    <               "id"   => '/usr/bin/id',                        // Something like /usr/bin/id. If empty, will be found in PATH.
    <               "stat" => '/usr/bin/stat',                      // Something like /usr/bin/stat. If empty, will be found in PATH.
    ---
    >        = array(
    >               php  => '/usr/bin/php',                 // Something like /usr/bin/php. If empty, will be found in PATH.
    >               curl => '/usr/bin/curl',                        // Something like /usr/bin/curl. If empty, will be found in PATH.
    >               gzip => '/bin/gzip',                    // Something like /usr/bin/gzip. If empty, will be found in PATH.
    >               id   => '/usr/bin/id',                  // Something like /usr/bin/id. If empty, will be found in PATH.
    >               stat => '/usr/bin/stat',                        // Something like /usr/bin/stat. If empty, will be found in PATH.
    48,50c49,51
    <       $localhosts = array(                    // list of local interfaces
    <               "127.0.0.1",
    <               "localhost",
    ---
    >        = array(                       // list of local interfaces
    >               127.0.0.1,
    >               localhost,
    53,54c54,55
    <       $profilePath = '../share';              // Path to user profiles
    <       $profileMask = 0777;                    // Mask for files and directory creation in user profiles.
    ---
    >        = '../share';          // Path to user profiles
    >        = 0777;                        // Mask for files and directory creation in user profiles.
    58a60
    >
    root@debian:/var/www/rutorrent/conf#

  12. #12
    Modérateur
    Avatar de N_BaH
    Profil pro
    Inscrit en
    Février 2008
    Messages
    7 646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 7 646
    Par défaut
    là, c'est quoi ? le résultat de cat <<'eof' >fichier, ou quoi ?

    $user [...] je doit l'ajouter a lendroit ou c'est écrie /home
    est-ce que ça suffirait à ce que le service ne fonctionne pas ?

    s'il y a au moins une variable à développer, alors tu n'as pas le choix, il faut effectivement passer par echo
    protège bien tout ce qui ne doit pas être développé.
    N'oubliez pas de consulter les cours shell, la FAQ, et les pages man.

  13. #13
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2013
    Messages
    38
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Juillet 2013
    Messages : 38
    Par défaut
    merci beaucoup grâce a toi j'ai pu voir mon erreur et réussir cette portion de code merci beaucoup !!!!

    enfait j'ai fait un echo tout propre et repéré tout les variable avec ctrl w
    et fat cela
    Code final Réussi
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    #!/bin/bash
    echo "
    <?php
            // configuration parameters
     
            // for snoopy client
            @define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0', true);
            @define('HTTP_TIME_OUT', 30, true);     // in seconds
            @define('HTTP_USE_GZIP', true, true);
            \$httpIP = null;                                // IP string. Or null for any.
     
            @define('RPC_TIME_OUT', 5, true);       // in seconds
     
            @define('LOG_RPC_CALLS', false, true);
            @define('LOG_RPC_FAULTS', true, true);
     
            // for php
            @define('PHP_USE_GZIP', false, true);
            @define('PHP_GZIP_LEVEL', 2, true);
     
            \$do_diagnostic = true;
            \$log_file = '/tmp/rutorrent_errors.log';               // path to log file (comment or leave blank to disable logging)
     
            \$saveUploadedTorrents = true;          // Save uploaded torrents to profile/torrents directory or not
            \$overwriteUploadedTorrents = false;     // Overwrite existing uploaded torrents in profile/torrents directory or make unique name
     
            \$topDirectory = '/home/$user/downloads';                       // Upper available directory. Absolute path with trail slash.
            \$forbidUserSettings = false;
     
            \$scgi_port = 5000;
            \$scgi_host = \"127.0.0.1\";
     
            // For web->rtorrent link through unix domain socket
            // (scgi_local in rtorrent conf file), change variables
            // above to something like this:
            //
        //\$scgi_port = 0;
            //\$scgi_host = \"unix:///tmp/rtorrent.sock\";
     
            \$XMLRPCMountPoint = \"/RPC2\";         // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
     
            \$pathToExternals = array(
                    \"php\"  => '/usr/bin/php',                     // Something like /usr/bin/php. If empty, will be found in PATH.
                    \"curl\" => '/usr/bin/curl',                    // Something like /usr/bin/curl. If empty, will be found in PATH.
                    \"gzip\" => '/bin/gzip',                        // Something like /usr/bin/gzip. If empty, will be found in PATH.
                    \"id\"   => '/usr/bin/id',                      // Something like /usr/bin/id. If empty, will be found in PATH.
                    \"stat\" => '/usr/bin/stat',                    // Something like /usr/bin/stat. If empty, will be found in PATH.
            );
     
            \$localhosts = array(                   // list of local interfaces
                    \"127.0.0.1\",
                    \"localhost\",
            );
     
            \$profilePath = '../share';             // Path to user profiles
            \$profileMask = 0777;                   // Mask for files and directory creation in us
                                            // For example, if Webserver and rtorrent users are in the same group then the value may be 0770.
     
    ?>
    " > /var/www/rutorrent/conf/config.php
    quand j'ai fait la première fois j'ai du oublier des variables ce qui a occasionner un problème et erreur au niveau du logiciel

  14. #14
    Modérateur
    Avatar de N_BaH
    Profil pro
    Inscrit en
    Février 2008
    Messages
    7 646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 7 646
    Par défaut
    repérer toutes les variables avec ctrl w
    ctrl-w ?
    qu'est-ce que c'est ?
    quel éditeur ?
    N'oubliez pas de consulter les cours shell, la FAQ, et les pages man.

  15. #15
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2013
    Messages
    38
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Juillet 2013
    Messages : 38
    Par défaut
    j'utilise nano c'est pour rechercher dans le code

  16. #16
    Modérateur
    Avatar de N_BaH
    Profil pro
    Inscrit en
    Février 2008
    Messages
    7 646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 7 646
    Par défaut
    j'avais oublié (déjà).
    je suis passé à vim (il y a peu) pour bénéficier de la coloration syntaxique.
    N'oubliez pas de consulter les cours shell, la FAQ, et les pages man.

  17. #17
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2013
    Messages
    38
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Juillet 2013
    Messages : 38
    Par défaut
    il a aussi de la coloration syntaxique avec nano du moins je crois

  18. #18
    Modérateur
    Avatar de N_BaH
    Profil pro
    Inscrit en
    Février 2008
    Messages
    7 646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 7 646
    Par défaut
    en effet, la coloration syntaxique existe pour nano.

    mais, entre autre, nano veut des extensions .awk pour mes scripts awk.
    il n'accepte qu'un seul include dans ~/.nanorc, et pas question de commenter le premier include pour que le deuxième prenne effet.

    alors, est-ce Debian? est-ce moi ? je trouve que ça ne fonctionne pas aussi bien que vim.
    N'oubliez pas de consulter les cours shell, la FAQ, et les pages man.

  19. #19
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2013
    Messages
    38
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Juillet 2013
    Messages : 38
    Par défaut
    je ne c'est pas trop mais j'ai deja tester vim pas aimer nano pour moi c'est nikel pas de problème p.s sa te dis de regarder le code de mon script j'aimerais avoir un avis il a beaucoup changer ^^

  20. #20
    Modérateur
    Avatar de N_BaH
    Profil pro
    Inscrit en
    Février 2008
    Messages
    7 646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 7 646
    Par défaut
    pas de problème, le forum est là pour ça.
    en plus tu auras aussi l'avis de mes petits camarades, tout aussi (voire plus) compétents.
    ouvre un nouveau sujet : «vos avis sur mon script»
    N'oubliez pas de consulter les cours shell, la FAQ, et les pages man.

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. [PHP/JavaScript] Variable php dans script Java
    Par Flushovsky dans le forum Langage
    Réponses: 2
    Dernier message: 27/06/2006, 19h51
  2. Un script shell avec nombre d'argument variable
    Par lastrecrue dans le forum Linux
    Réponses: 1
    Dernier message: 28/05/2006, 11h35
  3. Executer 1 script contenu dans une variable PHP
    Par emstar dans le forum Langage
    Réponses: 5
    Dernier message: 19/04/2006, 11h48
  4. Envoi d'une variable en shell script sur php
    Par Ponchi dans le forum Langage
    Réponses: 3
    Dernier message: 07/02/2006, 13h54
  5. Réponses: 9
    Dernier message: 05/01/2006, 12h24

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo