osql exits with error on Linux
Jan Blom <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <DB3PR05MB4285966061245329D593AD6EE610@DB3PR05MB428.eurprd05.prod.outlook.com> |
Hello, The osql script fails to execute on CentOS (tested on release 6 & 7). We need to add "-F" to grep to avoid interpreting patterns as a reg exp. Patch attached. Best regards, Jan Blom _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds
osql_patch.txt
(text/plain, 487 B)
--- freetds-1.0rc3/src/apps/osql 2015-01-26 21:32:41.000000000 +0100
+++ freetds-1.0rc3_patched/src/apps/osql 2016-04-25 00:05:07.455558900 +0200
@@ -120,7 +120,7 @@
continue
fi
- grep "[${DSN}]" $F > /dev/null
+ grep -F "[${DSN}]" $F > /dev/null
if [ $? -eq 0 ]
then
@@ -286,7 +286,7 @@
fi
echo "looking for [${TDS_SERVER}] in $F"
- grep "[${TDS_SERVER}]" $F > /dev/null
+ grep -F "[${TDS_SERVER}]" $F > /dev/null
if [ $? -eq 0 ]
then