Sed ajout en fin de commande script shell
Résolu
titoulevrai
-
titoulevrai -
titoulevrai -
A voir également:
- Sed -n shell
- Classic shell - Télécharger - Personnalisation
- Ssh secure shell download - Télécharger - Divers Web & Internet
- Shell startup windows 10 - Guide
- Shell infrastructure host c'est quoi - Guide
- Efi shell version 2.31 - Forum Programmation
1 réponse
Salut,
;-))
$ cat brol
echo lolpass1
ping 127.0.0.1 -c 2
echo testcom #commentaires
echo "test"
$ sed "/^$/! s/^[^#]*/& \&\& echo '& : OK' >> result.txt || echo '&' >> errors.log/" brol
echo lolpass1 && echo 'echo lolpass1 : OK' >> result.txt || echo 'echo lolpass1' >> errors.log
ping 127.0.0.1 -c 2 && echo 'ping 127.0.0.1 -c 2 : OK' >> result.txt || echo 'ping 127.0.0.1 -c 2' >> errors.log
echo testcom && echo 'echo testcom : OK' >> result.txt || echo 'echo testcom ' >> errors.log#commentaires
echo "test" && echo 'echo "test" : OK' >> result.txt || echo 'echo "test"' >> errors.log
;-))
titoulevrai
Merci beaucoup!