Learn Bash Scripting by Building Five Programs: fortune

Hi guys, im stucked in one of this lecture’s step.

This is what I am getting asked to do:

False. An important operator in that menu is =~ . It allows for pattern matching. Using the same syntax but with this operator, check if hello contains the pattern el .

It is not that I dont understand what I have to do or I am getting an error, is just that I cant type the ‘~’ character to solve this. Neither I can copy paste on the terminal.

I have searched about this and people say alt+126 fixes it, but it doesnt :confused:

Someone can help me please?

You do not explain why you cannot type the tilde. But perhaps something in this article will help you find it


You can try to switch the keyword to English querty. The tilde is at Shift+`

1 Like

btw. there is a way to copy and paste but it involves using SHIFT-INSERT (basically you highlight something and I think you use CTRL-C then you put your mouse in the terminal and then SHIFT-INSERT or something very close to that. I can test it out again if you cannot figure it out yourself)

I finally solved this.
I have a spanish keyboard so the tilde sign doesn´t figure in it. Changing it to English querty allowed me typing the sign.
Thanks for the help! :two_hearts:

1 Like