4 ms·
For an article like this, I do not think it is being pedantic to note that to "print a list of all the files with a txt extension in the current directory excep
by Ologn 14y ago
For an article like this, I do not think it is being pedantic to note that to "print a list of all the files with a txt extension in the current directory except for ignore_me.txt" you do not accomplish that by using the command "ls *.txt | grep -v ignore_me.txt". What if I have the file do_not_ignore_me.txt in that directory ?
Thus, I suppose my message is that Unix command line is even harder to properly use then he states. But in my opinion, the initial hurdles in learning it eventually pay off over time.
- Tmmrn 14y agoOr you just read about some features like advanced globbing. With zsh I can do what he wants without even invoking something that's not a shell builtin. $ ~/temp/temp % ls 1 10 2 3 4 5 6 7 8 9 ignore_me.txt $ ~/temp/temp % echo ^ignore_me.txt 1 10 2 3 4 5 6 7 8 9 $ ~/temp/temp %