View previous topic :: View next topic |
Author |
Message |
3PO Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/9424454044640eb15027ff.jpg)
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 |
|
![](templates/gentoo/images/spacer.gif) |
Oerpi n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/70199825950be6a82bc145.jpg)
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 |
|
![](templates/gentoo/images/spacer.gif) |
3PO Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/9424454044640eb15027ff.jpg)
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 |
|
![](templates/gentoo/images/spacer.gif) |
l3u Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/535570295dff893c1fda6.png)
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 |
|
![](templates/gentoo/images/spacer.gif) |
|