I need to test how a python TTS program reacts when a user input mistakenly two punctuation marks.
So I need to check the sentence "C'est un test!." (notice the !. at the end).
Consequently I input at prompt
$ python3 /home/user1/TTS/bin/synthesize.py --text "C'est un test!."
But Bash then shows :
python3 /home/user1/TTS/bin/synthesize.py --text "This is a test./configure"
(notice how "!." changed into "./configure").
"This is a test!" (without period) works but I need to test "!.".
I tried and replaced double quotes with single quotes without success, and I tried and escaped "!" with "" but it is included in the sentence sent to the TTS library.
I understood that "!" has a special meaning in Bash (well explained here) and associated with "." it uses a previous command.
Is there a way to prevent Bash from processing "!." in the string and pass it as it is ?
Thanks for your help
python3 /home/user1/TTS/bin/synthesize.py --text "C'est un"' test!.'
. Here the string is double-quoted to some point and single-quoted from the point. The point where quoting changes is almost arbitrary; it's only important your'
is double-quoted and!
is single-quoted. – Kamil Maciorowski Oct 03 '22 at 08:25set +H
solution below. – Cara Duf Oct 03 '22 at 08:28