I want to display a string in Bash like this
I\'m a student
Of course you can do it like this
echo \"I\'m a student\"
<
The "ugly" solution mentioned by Glenn Jackman should actually be listed as a top level answer. It works well and is actually beautiful in some situations.
'I'"'"'m a student'
This ends the single quoted string after I then immediately starts a double quoted string containing a single quote and then starts another single quoted string. Bash then concatenates all contiguous strings into one.
Beautiful!