Si votre email correspond à un compte, vous recevrez un lien de réinitialisation.
bonjour,Voici mon script :#!/usr/bin/perl$list_command="ls -la /tmp/log*";open(DIR, " $list_command | " ) || die " died " ;@list_logs = <DIR> ;closedir DIR;print @list_logs;Le resultat est le suivant :[]# ./test.pl-rw-r--r-- 1 root root 0 Feb 23 04:02 /tmp/log-rw-r--r-- 1 root root 0 Feb 22 04:02 /tmp/log.1-rw-r--r-- 1 root root 0 Feb 21 04:02 /tmp/log.2-rw-r--r-- 1 root root 370 Feb 21 00:24 /tmp/log.3-rw-r--r-- 1 root root 102 Feb 19 15:13 /tmp/log.4J'aimerai en fait que l'output soit le suivant :log Feb 23 04:02log.1 Feb 22 04:02log.2 Feb 21 04:02log.3 Feb 21 00:24log.4 Feb 19 15:13Etant donne que je suis un enorme noob en perl...je ne sait pas dutout comment m'y prendre.Merci d'avance pour votre aide :)
bonjour, Voici mon script : #!/usr/bin/perl $list_command="ls -la /tmp/log*"; open(DIR, " $list_command | " ) || die " died " ; @list_logs = <DIR> ; closedir DIR; print @list_logs; Le resultat est le suivant : [root@testsrv]# ./test.pl -rw-r--r-- 1 root root 0 Feb 23 04:02 /tmp/log -rw-r--r-- 1 root root 0 Feb 22 04:02 /tmp/log.1 -rw-r--r-- 1 root root 0 Feb 21 04:02 /tmp/log.2 -rw-r--r-- 1 root root 370 Feb 21 00:24 /tmp/log.3 -rw-r--r-- 1 root root 102 Feb 19 15:13 /tmp/log.4 J'aimerai en fait que l'output soit le suivant : log Feb 23 04:02 log.1 Feb 22 04:02 log.2 Feb 21 04:02 log.3 Feb 21 00:24 log.4 Feb 19 15:13 Etant donne que je suis un enorme noob en perl...je ne sait pas du tout comment m'y prendre. Merci d'avance pour votre aide :)
#!/usr/bin/perl$list_command="ls -la /tmp/log*";open(DIR, " $list_command | " ) || die " died " ;@list_logs = <DIR> ;closedir DIR;print @list_logs;Le resultat est le suivant :[]# ./test.pl-rw-r--r-- 1 root root 0 Feb 23 04:02 /tmp/log-rw-r--r-- 1 root root 0 Feb 22 04:02 /tmp/log.1-rw-r--r-- 1 root root 0 Feb 21 04:02 /tmp/log.2-rw-r--r-- 1 root root 370 Feb 21 00:24 /tmp/log.3-rw-r--r-- 1 root root 102 Feb 19 15:13 /tmp/log.4J'aimerai en fait que l'output soit le suivant :log Feb 23 04:02log.1 Feb 22 04:02log.2 Feb 21 04:02log.3 Feb 21 00:24log.4 Feb 19 15:13
#!/usr/bin/perl $list_command="ls -la /tmp/log*"; open(DIR, " $list_command | " ) || die " died " ; @list_logs = <DIR> ; closedir DIR; print @list_logs; Le resultat est le suivant : [root@testsrv]# ./test.pl -rw-r--r-- 1 root root 0 Feb 23 04:02 /tmp/log -rw-r--r-- 1 root root 0 Feb 22 04:02 /tmp/log.1 -rw-r--r-- 1 root root 0 Feb 21 04:02 /tmp/log.2 -rw-r--r-- 1 root root 370 Feb 21 00:24 /tmp/log.3 -rw-r--r-- 1 root root 102 Feb 19 15:13 /tmp/log.4 J'aimerai en fait que l'output soit le suivant : log Feb 23 04:02 log.1 Feb 22 04:02 log.2 Feb 21 04:02 log.3 Feb 21 00:24 log.4 Feb 19 15:13