I am using a Bash script to read line by line from a text file that has special characters (regular expression). When I use echo "${SOME_VAR}" , it does not display the text as it is .
I am familiar with the Prevent * for extension in Bash script .
How can I display and use text as is?
UPDATE A text file (TSV) contains tuples similar to (the last entry is a psql query)
bathroom bathroom select name from photos where name ~* '\mbathroom((s)?|(''s)?)\M';
I read CSV as follows:
tail -n+2 text.file | while IFS=$'\t' read xyz do echo "${z}" done
which gives way
select name from photos where name ~* 'mbathroom((s)?|(''s)?)M');
note that "\" is missing
source share