Tagged Questions
8
votes
5answers
234 views
Can I select only one result from a bash glob?
I'm trying to write a script for work to automate some reporting on an output. The Log files are (currently, it's being 'standardise' in the future) stored in this sort of path structure:
...
2
votes
2answers
85 views
What is an equivalent of rm `find lib/ -name *.swp` without find?
As in the title, I would like to remove all files in the lib directory with .swp in the end.
How can I do this without find in:
rm `find lib/ -name *.swp`
12
votes
5answers
3k views
How to match case insensitive patterns with ls?
I would like to list all files matching a certain pattern while ignoring the case.
For example, I run the following commands:
ls *abc*
I need to see all the file that have "abc" as a part of the ...