How to search ONLY in package names, without descriptions?

Hello!
I would like to know how I can search with pacman only in the package names, without searching descriptions?
For example, searching for the rar package (pacman -Ss rar) gives me tons of results with hundreds of packages, where "library" occurs in the description.
I have already read the pacman manual page, but I couldn't find anything suitable.
Greets, Horst

perl -e '$search = "rar";$output=`pacman -Ss $search`;while($output=~/^(\S.*?\Q$search\E.*?\n(?:\s.*\n)*)/mgi){print $1}'
This does the normal "pacman -Ss whatever" search, but then it checks that the search term is in the package name. Just replace "rar" in "$search = "rar" with whatever you want to search for.
I tried to make it work with grep using -P, but I still don't know how to make it case-insensitive then ("-i" doesn't seem to work with perl regexes). Here it is anyway though:
pacman -Ss rar | grep -P "^\S.*?rar(?:.*|\n)*?(?=\n\S)"
Aside from being case-sensitive, you also have to replace both instances of "rar" with your search term.
Here's a script version that you can run from the command line:
#!/usr/bin/perl
use strict;
use warnings;
my $search = "@ARGV";
my $output = '';
open(my $pipe,'-|',"pacman -Ss $search") or die "Unable to create pipe to pacman: $!\n";
while (defined(my $line=<$pipe>)){$output.=$line;}
close $pipe;
while($output=~/^(\S.*?\Q$search\E.*?\n(?:\s.*\n)*)/mgi){print $1};
Save it as "search_pkgnames", make it executable, then invoke it with your search term: search_pkgnames rar
Hope this helps.

Similar Messages

  • How to get List Item attachments name without write any custom code or any database query?

    Hi,
    How to get List Items attachments name without write any custom code or any database query?

    You can get it from Rest,
    There are 2 options,
    1) create a 'Result Source' which has a search query for that List which has attachments 
     - Use rest query to get the 'Filename' , it will have the attachment file name 
    For example, if the result source id is : 73e6b573-abf8-4407-9e5f-8a85a4a95159 , then the query will be 
    http://[site URL]/_api/search/query?querytext='*'&selectproperties='Title,Path,FileExtension,SecondaryFileExtension,Filename'&sourceid='73e6b573-abf8-4407-9e5f-8a85a4a95159'&startrow=0&rowLimit=100
    You can refine the query, be giving proper 'querytext'
    2) Use the List rest api
    For example if your list guid is :38d524a1-e95c-439f-befd-9ede6ecd242e
    You can get he attachments for 1st item using this 
    http://[Site URL]/_api/lists(guid'38d524a1-e95c-439f-befd-9ede6ecd242e')/items(1)/AttachmentFiles
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • How to Search document by using Long text description contents in SAPEasy DMS

    Hi,
    How to Search document by using Long text description contents in SAPEasy DMS
    Regards,
    Shrikant Shinde

    Hi Alfredo,
    Thanks for reply..Will you please explain in brief what are the  OCR program and workflow.
    Will you please send me any docs on [email protected]
    Thanks
    shiv.

  • How to get only the graphics path without graphics names?

    Hi All,
    I need to get only the graphics path without graphics names like 'd:\Images\' instead of 'd:\Images\abc.jpg' in JS.
    Thanks,
    Praveen

    Something like this should get you close…
    #target indesign
    function main() {
         if (app.documents.length == 0) {
              alert('Please have an "Indesign" document before running this script.');
         return;
         docRef = app.activeDocument;
         with(docRef) {
              var x = rectangles[0].allGraphics[0].itemLink.filePath;
              var y = new File(x).parent.fsName;
              $.writeln(y);
    main();

  • [SOLVED] search just package name (not description) with yaourt

    Is there a way to search just package names (not package descriptions) with yaourt or pacman?  I'm imagining something like this:
    $ yaourt  -Ss  --pkgname-only  xterm
    Thanks!
    Last edited by partner55083777 (2010-02-03 16:30:43)

    My question still stands as to how I can search just package names.  If it is using another program other than yaourt or pacman, that is okay.
    "yaourt -Ss SEARCH_STRING" has been working as stated in the documentation for me (with yaourt-0.9.2.6).  It will return all packages that have SEARCH_STRING in either the package name or package description.
    Here are the first three results when running this command:
    $ yaourt -Ss emacs
    extra/emacs 23.1-3 [installed]
         The Emacs Editor
    extra/snd 10.1-1
         Snd is the emacs of sound editor
    extra/texmacs 1.0.7-3
         GNU TeXmacs is a free scientific text editor, which was both inspired by TeX
         and GNU Emacs. WYSIWYG editor TeX-fonts and CAS-interface (Giac, GTybalt,
         Macaulay 2, Maxima, Octave, Pari, Qcl, R and Yacas) in one.
    $
    It looks like it works as specified in the man pages:
    -s, --search <'regexp'>
               This will search each package in the sync databases for names or descriptions that match regexp.
               When you include multiple search terms, only packages with descriptions matching ALL of those terms will be returned.
    Last edited by partner55083777 (2010-02-02 22:10:24)

  • How to uninstall only 32-bit CS5 without also uninstalling the 64-bit version?

    I have installed both the 32-bit and 64-bit version of CS5 in my Win7 system. Did that because some plugins does not run on 64-bit.
    Now I wanted to trial CS6 and so do not wish to have too many versions on my pc.
    I want to uninstall ONLY the 32-bit CS5. When I go to either my Uninstaller software or the "Program & Features" of Control Panel, I could only see one icon/program for PS- not 2 (one for 32-bit & 64-bit respectively).
    How do I uninstall only the 32-bit without affecting the 64-bit version?
    Thanks.

    Probably have to uninstall entire CS5 and then only install 64 bit version.  What will you do with plugins?
    Perhaps a better solution is to just install CS6 64 bit.
    Some users have problems when they uninstall a previous version.  So best to leave CS5 on if you decide to keep CS6.

  • IRec : How to search only internal candidate applied for job

    Hi,
    How shall we only search the internal candidate in the candidate: prospect pool, Candidate: individual , Candidate : Resume search,
    or vacancy--> applicant search. I just need to search for internal candidate excluding the external applicant. Any option or customization suggestion please
    thanks
    Siva

    Hi,
    On any tab there is email, you can use the same to filter down on internal applicants (using the @company.com) in the end. On the applicant tab, there is a search for employee and ex-employee, enable the drop-down.
    Customization is possible but will be tricky as these pages use the advanced search pattern in OA framework and so, extensions are harder to do, though not impossible.
    Regards,
    Vinayaka

  • How to change newly registered user name, without changing entire apple id, in iCloud?

    Recently created new user name.  Need to change it.  I do not want to change my entire apple id account information.  The only information I can find in communities, has to do with the previous Mobile Me stuff and not the new iCloud stuff.  Again, I don't want to change my long standing account id with Apple.  There must be some sane way to do this!  I've been searching now, for over 2 hours.  Help! 

    Go to https//appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • How to change the RPD file name without deploying on EM

    Is there a way to change the RPD file name so it doesn't have BI0002 or BI0003 on the end of it? I can delete my BI0002 file and point the NQSConfig.ini file to my new FileName.rpd but when the BI services restart the BI0002 file reappears in the repository directory and the NQSConfig file changes to reflect this. It's like the only way you can change this is in the Enterprise Manager, but that always adds the suffix to the file.
    Any suggestions?
    Here's what the docs say:
    When you upload a repository, it is copied to the local repository directory for each Oracle BI Server component, located at:
    ORACLE_INSTANCE\bifoundation\OracleBIServerComponent\coreapplication_obisn\repository
    If you have published the repository in shared mode, then the repository is also copied to the shared network location.
    After the repository is uploaded, it is given a version number suffix (for example, SampleApp_bi001.rpd). This version number is incremented each time that the repository is uploaded. To revert to a previous version, you must re-upload the specific version of the repository to use.
    Note that you can delete older versions from the repository directory or shared network directory to reclaim disk space.
    What does that mean? I have to use an old rpd file in order to get rid of the suffix?

    Hi,
    It can be changed, although I do not no exactly how. You have to take a look at the MBeans which are used to deploy a new repository. The suffixed is used to insure you do not overwrite an existing RPD
    Cheers,
    Daan Bakboord
    http://obibb.wordpress.com

  • In Search - Only first ten name displays

    Dear All,
    When I search for a name,only top ten relevant names pops out,for more information please check the attachment. is it bug or Google chrome impact ?.
    Thanks
    Agasthuri
    PS: I was looking for name "Amit Srivastava" the search result pop out only ten names, actually the user name "Amit Srivastava" is more than ten, I am unable to scroll the list...

    Hi Doss,
    You can click on select people option at rigth side(from your screen, against to search function)
    on next screen, click on search tab and  scn user name and search it.you will get same/similar names with more pages.
    Thanks

  • How I search only sub directories in my bookmarks?

    If I do search Firefox searches through all my bookmarks. I only want it to search in the current directory and/or sub directories.
    I do not want to use tags. I just want to search for the name.

    Is there any add-ons that I can use to make searching my bookmarks useful. It is now getting beyond frustrating. I can not believe this program doesn't have a useful way to search.

  • How to search only People using javascript (sp.search.js)?

    My code:
    $("#searchButton").click(function () {        var keywordQuery = new Microsoft.SharePoint.Client.Search.Query.KeywordQuery(context);        keywordQuery.set_queryText($("#searchTextBox").val());        var searchExecutor = new Microsoft.SharePoint.Client.Search.Query.SearchExecutor(context); results = searchExecutor.executeQuery(keywordQuery);        context.executeQueryAsync(onQuerySuccess, onQueryError);    });        function onQuerySuccess() {        $("#resultsDiv").append('<table>');        $.each(results.m_value.ResultTables[0].ResultRows, function () {      $("#resultsDiv").append('<tr>');            $("#resultsDiv").append('<td>' + this.Author + '</td>');            $("#resultsDiv").append('<td>' + this.Title + '</td>');            $("#resultsDiv").append('</tr>');        });        $("#resultsDiv").append('</table>');    }
    But this code actually find all results. How to filter to show only People results?

    I have search the people in sharepoint online by using following code. It's work fine.I hope it's use full for some one
    var targetSite = new Uri("siteURL");
                var login = "username";\\same as your email
                var password = "password";
                var securePassword = new SecureString();
                foreach (char c in password)
                    securePassword.AppendChar(c);
                var onlineCredentials = new SharePointOnlineCredentials(login, securePassword);
                using (ClientContext clientContext = new ClientContext(targetSite ))
                    clientContext.Credentials = onlineCredentials;
                    KeywordQuery keywordQuery = new KeywordQuery(clientContext);
                    keywordQuery.QueryText = "Query text";
                    keywordQuery.SourceId = Guid.Parse ("B09A7990-05EA-4AF9-81EF-EDFAB16C4E31");
                    SearchExecutor searchExecutor = new SearchExecutor(clientContext);
                    ClientResult<ResultTableCollection> results = searchExecutor.ExecuteQuery(keywordQuery);
                    clientContext.ExecuteQuery();
                    foreach (var resultRow in results.Value[0].ResultRows)
                        string test = resultRow["PreferredName"].ToString();
    Ravin Singh D

  • HT1296 i want to sync my itunes to a new iphone that has been restored from a backup on my old one, how di i only sync the music without erasing everything else like contacts and messages?

    i have just got a new iphone 4s, replacing the last one i had, and i have restored it from itunes with the data from my last iphone. i want to sync the music to this but it is already synced with the last computer i had, so how do i sync my iphone without erasing every bit of content from my iphone, such as the things that are important to me like the contacts and messages and photos?
    please help!
    Thank you!

    Only iTunes content and photos transferred from another computer is affected when transferring iTunes content and photos from a different computer. Contacts aren't touched unless you choose to sync contacts with a supported address book app. Messages aren't included with the iTunes sync process and the same for photos/videos in the iPhone's Camera Roll.

  • How do I batch the file name (without extention) into the keyword in the metadata

    I am trying to use a keyword into sets of images, each of the images on the set contains in the file name what I want for keyword and an extension.
    Example,
    File names:   
    WD111_main
    WD111_01
    WD111_02
    I want all of them to have on the metadata just WD111.
    help?!?!

    You will need to do this with a text field and a Javascript that executes on open.

  • [SOLVED]How to search package name only when using yaourt

    I often install a AUR package by yaourt term, but it does not only search terms in package name but also package description, since there are so much packages in AUR, it produce many pages of items, and it can not support more to page one screenful at a time, It
    become difficult to get the right choice,
    Thank you in advance!
    Last edited by netawater (2013-06-14 00:47:06)

    Hey, that's one thing I actually know how to do with regexes! All package descriptions have some spaces at their beginning, the package names themselves have not, so you can just use inverted grepping like so:
    $ pacman -Ss test | grep -v '^ '
    core/perl 5.10.1-5 (base)
    extra/fprint_demo 0.4-2 (fprint)
    extra/ghc 6.12.1-2
    extra/haskell-hunit 1.2.2.1-1
    extra/haskell-quickcheck 2.1.0.3-1
    extra/junit 4.7-1
    extra/kdesdk-kpartloader 4.4.0-1 (kde kdesdk)
    extra/libxtst 1.1.0-1
    extra/memtest86+ 4.00-1
    extra/mono-tools 2.6.1-1
    extra/openoffice-base 3.2.0-1
    extra/openoffice-base-beta 3.2.0_ooo320_m12-1
    extra/perl-test-pod 1.41-1
    extra/python-nose 0.11.1-1
    extra/qemu-kvm 0.12.2-1
    extra/testdisk 6.11.3-2
    extra/unarj 2.63a-2
    extra/xbill 2.1-6
    xyne-any/reflector 5.0-2
    community/buildbot 0.7.11p3-1
    community/cppunit 1.12.1-1
    community/cxxtest 3.10.1-3
    community/dsniff 2.4b1-15
    community/gtk-aurora-engine 1.5.1-1
    community/gtkperf 0.40-3
    community/java-jdom 1.1.1-1
    community/lib32-libxtst 1.1.0-1 (lib32)
    community/perl-test-base 0.59-1
    community/perl-test-deep 0.106-1
    community/perl-test-differences 0.500-1
    community/perl-test-exception 0.29-1
    community/perl-test-manifest 1.23-1
    community/perl-test-mockobject 1.09-1
    community/perl-test-nowarnings 1.01-1
    community/perl-test-tester 0.107-1
    community/perl-test-warn 0.21-2
    community/phoronix-test-suite 2.4.0-1
    community/pmtools 20100123-1
    community/reflector 5.0-2
    community/stress 1.0.0-2
    community/typespeed 0.6.5-2
    arch-games/mangler-snapshot 1.1.20100116-3
    arch-games/ultimatestunts 0.7.5.1-1
    This still shows the repos and the versions (nothing cut wouldn't be able to handle though). It works fine with pacman as you just saw, I can't guarantee for yaourt as I don't have it installed.
    Edit: Hm… I just realized that this still displays the results where 'test' only occured in the package description. Give me some time to figure this out.
    Edit 2: Another grep for 'test' would solve it:
    $ pacman -Ss test | grep -v '^ ' | grep test
    extra/memtest86+ 4.00-1
    extra/perl-test-pod 1.41-1
    extra/testdisk 6.11.3-2
    community/cxxtest 3.10.1-3
    community/perl-test-base 0.59-1
    community/perl-test-deep 0.106-1
    community/perl-test-differences 0.500-1
    community/perl-test-exception 0.29-1
    community/perl-test-manifest 1.23-1
    community/perl-test-mockobject 1.09-1
    community/perl-test-nowarnings 1.01-1
    community/perl-test-tester 0.107-1
    community/perl-test-warn 0.21-2
    community/phoronix-test-suite 2.4.0-1
    arch-games/ultimatestunts 0.7.5.1-1
    Still, it's not that pretty to write the same thing twice. If you really want to do it like this, I suggest you make it a function in your ~/.${SHELL}rc.
    Last edited by Runiq (2010-02-27 08:36:11)

Maybe you are looking for