Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Frage zu echo-Befehl
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Tue Sep 16, 2008 8:21 pm    Post subject: Frage zu echo-Befehl Reply with quote

Hallo Zusammen,

ich habe mal wieder ein kleines Problemchen.... :lol:

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. :cry:

Gibt es da eine Trick wie man das machen kann?
Back to top
View user's profile Send private message
Oerpi
n00b
n00b


Joined: 20 Jun 2008
Posts: 36
Location: Germany

PostPosted: Tue Sep 16, 2008 8:28 pm    Post subject: Reply with quote

Code:
echo '"testtext"' > datei.bla


edit: das wäre: shift #
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Tue Sep 16, 2008 8:39 pm    Post subject: Reply with quote

1000 Dank @ Orrpi,

genau danach hatte ich gesucht.
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2616
Location: Konradsreuth (Germany)

PostPosted: Tue Sep 16, 2008 8:47 pm    Post subject: Reply with quote

Oder escapes: echo "\"Text\"" > datei
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum