T trequ Grünschnabel 30. Januar 2009 #1 Hallo. Ich möchte folgende Zeiche per echo ausgeben: Code: awk {print \$0} /^Line 2/ {print 'Test'} < testfile Bei mir kommt allerdings kein $0 raus: Code: awk {print \-tcsh} /^Line 2/ {print 'Test'} < testfile Wie escapet man $0 ?
Hallo. Ich möchte folgende Zeiche per echo ausgeben: Code: awk {print \$0} /^Line 2/ {print 'Test'} < testfile Bei mir kommt allerdings kein $0 raus: Code: awk {print \-tcsh} /^Line 2/ {print 'Test'} < testfile Wie escapet man $0 ?
Bratkartoffel gebratene Kartoffel Premium-User 5. Februar 2009 #2 Hi, bin mir zwar nicht ganz sicher, aber probiers mal so: Code: awk {print \\\$0} /^Line 2/ {print 'Test'} < testfile Also den Backslash ebenfalls escapen Gruß BK
Hi, bin mir zwar nicht ganz sicher, aber probiers mal so: Code: awk {print \\\$0} /^Line 2/ {print 'Test'} < testfile Also den Backslash ebenfalls escapen Gruß BK