Quote:
Originally Posted by raccoon
Hi, dear all
I have the following problem. Wondering who could tell me why it happens.
$ db2 connect to dbname
$ hoge=`db2 -x values current date | sed 's/\///g'`
$ echo $hoge
SQL1024N A database connection does not exist. SQLSTATE=08003
|
The error is due to the pipe to sed. You can avoid error by defering sed until later:
$ db2 connect to dbname
$ h=`db2 -x values current date`
$ hoge=`echo $h | sed -e "s/\///g"`
/Lennart