Difference between single and double quotes in Bash

Single quotes won’t interpolate anything, but double quotes will. For example: variables, backticks, certain \ escapes, etc. Example: $ echo “$(echo “upg”)” upg $ echo ‘$(echo “upg”)’ $(echo “upg”) The Bash manual has this to say: 3.1.2.2 Single Quotes Enclosing characters in single quotes (‘) preserves the literal value of each character within the quotes. … Read more

How can I output MySQL query results in CSV format?

From Save MySQL query results into a text or CSV file: SELECT order_id,product_name,qty FROM orders WHERE foo = ‘bar’ INTO OUTFILE ‘/var/lib/mysql-files/orders.csv’ FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘\n’; Note: That syntax may need to be reordered to SELECT order_id,product_name,qty INTO OUTFILE ‘/var/lib/mysql-files/orders.csv’ FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘”‘ LINES … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)