Screen Link: https://app.dataquest.io/m/386/glob-patterns-and-wildcards/6/other-wildcards
My Code:
ls *[[:alnum:]]
What I expected to happen: List all the files and directory content with names that end in either a letter or a number.
What actually happened:
ls *aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalnum
ls: cannot access *aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalnum:
Mission reference : Glob patterns and wildcards, task 6
It seems like the online command line does not recognize shortcuts such as backslash, brackets …
Bruno
May 21, 2020, 11:10am
#2
Can you please share a screenshot depicting this behavior?
h.chakroun1990:
ls *[[:alnum:]]
I typed the command mentioned above out of the command line and copy pasted it.
when I type alt-5 twice for the two first brackets this is what happens :
and at the end when typing the whole command this is what is displayed (before typing enter) :
After typing enter, this is what happens :
Bruno
May 21, 2020, 12:41pm
#4
Sorry, I don’t understand what you did at all.
Can you share a screenshot where the whole line looks like what is below?
/home/dq/brats$ ls *[[:alnum:]]
If you can’t, why can’t you?
I cannot type it directly in the shell but I can type it outside the shell then copy paste it in the shell and it works as required.
So my problem is that I cannot type brackets " [" , " ] " directly in the shell.
PS : I had the same problem in a previous mission with “~”
Bruno
May 21, 2020, 1:00pm
#6
Ohhh, got it.
I thought you typing in correct code and it wasn’t working. You can’t even type in the correct code.
Sorry, I don’t know how to help to that issue. I’ll loop in Sahil to try to help. CC @Sahil
Sahil
June 1, 2020, 1:51pm
#8
Hi @hannahjoy.hj ,
Unfortunately, Alt Key is used for digit argument in bash.
Can you try changing your keyboard layout?
I tried it in my computer and it Works. But I can’t write “~$” symbols and backslash (Actually I can’t use 'AltGr’button) in command line terminal in course content. I can’t understand where is the problem?
Also I can’t copy and paste something to the command line. I don’t live same problem with command line in my computer.
Best,
Sahil