I've created simple text file named "T" to test the unusual behavior of grep: 1 Debug 2 debug 3 determined 4 Determined Tried different syntax: $ grep De T 1 Debug ...
The command ls .* when run gives as output the following : All the files in the current directory starting with a . (hidden files) All the files in the hidden directories present in the ...
I'm wondering what's the difference between using * and .* in a regex string. I guess, * stands for "0 to n characters" but I don't see what .* stands for. For example, what is the difference ...
I am confused with the syntax description given for lftp from their website: -x RX, --exclude=RX exclude matching files -X GP, --exclude-glob=GP exclude matching files How ...
Is there something like a logical for the cli? I want to achieve this mv -t newfolder *.(png|jpg) so that alls jpg and png files are moved into newfolder. I know it could be done with mv -t ...
I have a regex I stuck in my .gitignore similar to: (Big|Small)(State|City)-[0-9]*\.csv It didn't work so I tested it against RegexLab.NET. I then found the gitignore man page which led me to ...
I have a file containing random codes. Each code has ten characters in it, and I am trying to grep codes in the file that have at least 2 occurrences of a character. I am doing this: grep DD* ...
I want to list (or delete, or do some other operation) on certain files in a directory, like this: $ ls /opt/somedir/ aa bb cc aa.txt bb.txt cc.txt $ ls /opt/somedir/(aa|bb|cc) ## pseudo-bash ...