View previous topic :: View next topic |
Author |
Message |
3PO Veteran


Joined: 26 Nov 2006 Posts: 1110 Location: Schwabenländle
|
Posted: Tue Sep 16, 2008 8:21 pm Post subject: Frage zu echo-Befehl |
|
|
Hallo Zusammen,
ich habe mal wieder ein kleines Problemchen....
Ich möchte in einem Script mit dem Befehl echo einen Text in eine Datei schreiben.
Nun, das das mit echo "testtext" > meine.datei geht, ist mir bekannt.
Jetzt kommt aber das Problem:
Der Text den ich einfügen möchte enthält Anführungszeichen.
echo ""testtext"" > meine.datei <-- geht nicht.
Gibt es da eine Trick wie man das machen kann? |
|
Back to top |
|
 |
Oerpi n00b


Joined: 20 Jun 2008 Posts: 36 Location: Germany
|
Posted: Tue Sep 16, 2008 8:28 pm Post subject: |
|
|
Code: | echo '"testtext"' > datei.bla |
edit: das wäre: shift # |
|
Back to top |
|
 |
3PO Veteran


Joined: 26 Nov 2006 Posts: 1110 Location: Schwabenländle
|
Posted: Tue Sep 16, 2008 8:39 pm Post subject: |
|
|
1000 Dank @ Orrpi,
genau danach hatte ich gesucht. |
|
Back to top |
|
 |
l3u Advocate


Joined: 26 Jan 2005 Posts: 2616 Location: Konradsreuth (Germany)
|
Posted: Tue Sep 16, 2008 8:47 pm Post subject: |
|
|
Oder escapes: echo "\"Text\"" > datei |
|
Back to top |
|
 |
|