In order to work with special characters so they’re not viewed as operators, you need to make use of what is called backslash-escaping. See the code below. #!/usr/bin/env bashYOUR_FILE='testing.txt' TEXT="don't be sad! Just say, "life is good!""sed -i "" "s/$TEXT/tomorrow...