Hi,
Can someone let me know how I can acheive the following.
I have ~ delimited file and I need to convert into something like SQL insert statements.
SrcFile :
1~sjdsdj~asasas~
2~aaaaa~qwqwqwq~qwq
.....
I tried
Code:
AWK -F"~" '{print "INSERT INTO XX VALUES("$1 " ,\' "$2" \' , \' "$3 }' SrcFile
However AWK always treat '(single quote) as differently & i guess since single quote appear more than once. Any idea how i can make awk to treat single quote as text character or is this possible in
SED?
'{print "INSERT INTO XX VALUES("$1 " ,\' "$2" \' , \' "$3 }'
|------------------------------------|xxxxxxx|--|xxxxxx|