WHile executing a script i am getting the error - " Unterminated String". Exact display of error is as below:
awk: /BOS_TITLE/ { printf("%s", " Back Office System
awk: ^ unterminated string
What is the reason for the error and its solution?
era
April 15, 2008, 4:38am
2
It means you miss a closing quote.
I had written the complete statement, still it gave the same error. Thestatement that i wrote is as below:
awk '/BOS_TITLE/ { printf("%s", "'"$bos_title"'")}'
Try this:
awk '/BOS_TITLE/ { printf("%s", '"$bos_title"')}'
or:
awk -v var="$bos_title" '/BOS_TITLE/ { printf("%s", var )}'
Regards
Hi Franklin52,
the 2nd one is working..thank you so much