[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Frage zu awk



On 06.10.2009, at 14:18, Ralf Hackmann wrote:

testawk.txt:
00341493-0200             180
00342322-0200              90
10000119-0200              30

awk '{print " update fyar2sta set lpermax=" $2, "where sa=0 and artikel=" $1";" }' testawk.txt

erzeugt folgende Ausgabe:

update fyar2sta set lpermax=LPERMAX1 where sa=0 and artikel=ARTIKEL1;
update fyar2sta set lpermax=LPERMAX2 where sa=0 and artikel=ARTIKEL2;
update fyar2sta set lpermax=LPERMAX3 where sa=0 and artikel=ARTIKEL3;

Wie muss ich den AWK befehl umbauen, damit folgende Ausgabe erzeugt wird?

update fyar2sta set lpermax=LPERMAX1 where sa=0 and artikel='ARTIKEL1';
update fyar2sta set lpermax=LPERMAX2 where sa=0 and artikel=ARTIKEL2;
update fyar2sta set lpermax=LPERMAX3 where sa=0 and artikel='ARTIKEL3’;

http://www.unix.com/unix-dummies-questions-answers/26035-how-print-single-quote-awk.html


ttyl8er, t.k.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Reply to: