[Bash] Probleme d'affectation de variable
Résolu/Fermé
lordjs
Messages postés
6
Date d'inscription
mardi 2 avril 2013
Statut
Membre
Dernière intervention
4 avril 2013
-
2 avril 2013 à 17:16
lordjs Messages postés 6 Date d'inscription mardi 2 avril 2013 Statut Membre Dernière intervention 4 avril 2013 - 3 avril 2013 à 17:37
lordjs Messages postés 6 Date d'inscription mardi 2 avril 2013 Statut Membre Dernière intervention 4 avril 2013 - 3 avril 2013 à 17:37
A voir également:
- [Bash] Probleme d'affectation de variable
- Minimal bash-like line editing is supported ✓ - Forum Linux / Unix
- Bash écrire dans un fichier - Forum Shell
- Retour à la ligne bash ✓ - Forum Shell
- Bash path - Astuces et Solutions
- Bash permission non accordée - Forum Shell
10 réponses
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
3 avril 2013 à 08:31
3 avril 2013 à 08:31
hello
en shell bash ou en batch DOS ?
en shell bash ou en batch DOS ?
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
3 avril 2013 à 10:15
3 avril 2013 à 10:15
comme ça :
C:> echo ^<?xml version="1.0" encoding="UTF-8"?^> > toto.txt C:> type toto.txt <?xml version="1.0" encoding="UTF-8"?> C:>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
3 avril 2013 à 11:23
3 avril 2013 à 11:23
soit plus précis
Alors mon bat contient ca
set /p texte= < CodeDepart.txt
echo %texte% > programmeJournee.xspf
Le fichier contenant le code XML contient
"<?xml version="1.0" encoding="UTF-8"?><playlist version="1" xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/"><title>Liste de lecture</title><location>C:\BAM\programmeJournee.xspf</location><trackList>"
J'ai essayé d'inserer type programmeJournee.xspf <?xml version="1.0" encoding="UTF-8"?> mais ca marche pas.
set /p texte= < CodeDepart.txt
echo %texte% > programmeJournee.xspf
Le fichier contenant le code XML contient
"<?xml version="1.0" encoding="UTF-8"?><playlist version="1" xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/"><title>Liste de lecture</title><location>C:\BAM\programmeJournee.xspf</location><trackList>"
J'ai essayé d'inserer type programmeJournee.xspf <?xml version="1.0" encoding="UTF-8"?> mais ca marche pas.
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
3 avril 2013 à 12:40
3 avril 2013 à 12:40
où sont les ^
lordjs
Messages postés
6
Date d'inscription
mardi 2 avril 2013
Statut
Membre
Dernière intervention
4 avril 2013
3 avril 2013 à 15:32
3 avril 2013 à 15:32
Ca y est j'ai reussi ! Il suffisait de rajouter ^ devant les <>,je n'ai par contre pas reussi a faire marcher la ligne type toto.txt ... . Mais mon script marche tres bien quand meme :) Merci beaucoup a toi !
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
3 avril 2013 à 16:00
3 avril 2013 à 16:00
la commande type fichier.txt affiche le contenu de fichier.txt
lordjs
Messages postés
6
Date d'inscription
mardi 2 avril 2013
Statut
Membre
Dernière intervention
4 avril 2013
3 avril 2013 à 17:37
3 avril 2013 à 17:37
Ahah ! La j'ai compris, merci a toi !!!