|
How to ignore * (asterisk) in a variable
I am using a shell script to read SQL statements stored in a DB2 table and write them out to a file. The problem I have is that some SQL statements have an "*" in them which gets resolved as the list of files in the current directory when I run the script. How can I prevent the "*" from being resolved??
Actual SQL: SELECT * FROM RTDS.TSPSTOPS
Result SQL: SELECT gen.out gen.sql gen2.sql getsql.sh getsql2.sh sqlrow.out sqltxt.out test.sh FROM RTDS.TSPSTOPS
Code Snippet:
sqlrow=$(db2 +c -x fetch from c1 )
fetchrc=$?
echo fetchrc = $rc
echo ${sqlrow}
|