Hi polikuo
Thanks, but most non-alphanumeric don't even need to be escaped.
As I said in reply #36:
That was the plan:
Use a / to mark the beginning of the search term if desired.
Type in your search term.
Use a $ sign to mark the end of the search term if desired.
Hit enter.
I am:
1. Trying to simplify the search so you don't need to enter or learn
escape or quoting techniques to find what you're looking for.
2. Make the search return a tiny list instead of hundreds of results.
This version of provides.sh can accept the following characters in the command line:
! # % + , - . / : = ? @ [ ] ^ _ { } ~ and blank spaces
Most appear in various provides.db files.
All have been tested.
I have not found the following in any provides.db files:
< > & * ; ' " `
The shell will try to act on them and may do bad things.
The shell will try to act on these but I found them in TC10 x86 provides.db file:
( )
It is a short list and you don't need ( or ) to find any of them:
tc@E310:~/Scripting/Provides$ grep '(' /etc/sysconfig/tcedir/provides.db
usr/local/share/gtk-doc/html/cairo/cairo-Quartz-(CGFont)-Fonts.html
/usr/local/lib/deadbeef/convpresets/AAC_(Nero_FAAC).txt
/usr/local/lib/deadbeef/convpresets/FLAC_(compression_level_5).txt
/usr/local/lib/deadbeef/convpresets/MP3_CBR_320_Kbps_(Lame).txt
/usr/local/lib/deadbeef/convpresets/MP3_VBR_192Kbps_(Lame).txt
/usr/local/lib/deadbeef/convpresets/Ogg_Vorbis_(-q_5).txt
/usr/local/share/vim/vim82/lang/menu_chinese(gb)_gb.936.vim
/usr/local/share/vim/vim82/lang/menu_chinese(taiwan)_taiwan.950.vim
/usr/local/share/mypaint-data/1.0/brushes/kaerhon_v1/smudge_ink(0.7)_sm.myb
/usr/local/share/mypaint-data/1.0/brushes/kaerhon_v1/smudge_ink(0.7)_sm_prev.png
/usr/local/lib/python3.6/site-packages/setuptools/script (dev).tmpl
/usr/local/lib/python2.7/site-packages/setuptools-39.0.1-py2.7.egg/setuptools/script (dev).tmpl
usr/local/share/vim/vim72/lang/menu_chinese(gb)_gb.936.vim
usr/local/share/vim/vim72/lang/menu_chinese(taiwan)_taiwan.950.vim
usr/local/share/gtk-doc/html/libxfce4panel-1.0/libxfce4panel-Panel-Plugin-Register-Macros-(4.6-Style).html
tc@E310:~/Scripting/Provides$
... The only thing that needs adjusting is the leading "^" ...
There is no leading ^ in this type of search. All filenames include a path, so
to anchor the beginning, just add a leading slash.
Let's say you're looking for program called apps:
tc@E310:~/Scripting/Provides$ ./provides.sh apps | wc -l
95
That's way too many. To narrow the search, you add an anchor:
tc@E310:~/Scripting/Provides$ ./provides.sh /apps | wc -l
78
That narrowed it some, but you know it's a program, so you extend the anchor:
tc@E310:~/Scripting/Provides$ ./provides.sh bin/apps
Xprogs.tcz