Programmation.shell : shell dans un editeur
Posté par spider10 () le 02 juillet 2008
0
Bonjour,
je voudrais realise dans script shell test.sh qui contient vi mais quand j'execute il affiche une page vide
voila mon script
#!bin/bash
vi /home/test/.procmailrc
SHELL=/bin/sh
PATH=/usr/bin
DEFAULT=/home/essai/mail/ #repertoire pa defaut ou sont stockes les mails
MAILDIR=/home/essai/
LOGFILE=$MAILDIR/.procmail.log
INCLUDEDIR=/home/essai/.procmailrc
MAILCOPY=/home/essai/copymail/
:0c:
* ^From.*fai@hotmail.com
$MAILCOPY
:wq
> Lire le message (2 commentaires, moyenne: 2).
Vous avez demandé le commentaire #946599.



le meme code, avec les retours à la ligne
#!bin/bash
vi /home/test/.procmailrc
SHELL=/bin/sh
PATH=/usr/bin
DEFAULT=/home/essai/mail/
#repertoire pa defaut ou sont stockes les mails
MAILDIR=/home/essai/
LOGFILE=$MAILDIR/.procmail.log
INCLUDEDIR=/home/essai/.procmailrc
MAILCOPY=/home/essai/copymail/ :0c: * ^From.*fai@hotmail.com $MAILCOPY :wq
Apprendre par les autres, c'est bien.
Apprendre par soi-meme (RTFM, man, et notre ami google) c'est mieux
[ Répondre ]