[INDOLOGY] Grep tool for searching on Mac

Lubin, Tim LubinT at wlu.edu
Fri Sep 17 21:32:42 UTC 2021


Dear Madhav,

In addition to the concise explanation in the link Arjuna sent, one might add a word about the grep’s general utility for Indologists.  With the already enormous and rapidly growing wealth of Sanskrit texts available in digital form from GRETIL and many other sources, one now has at one’s fingertips a powerful tool that acts like a global index to all that material, not just to certain words but to any string of characters or co-occurrence of multiple strings.  Moreover, your search will turn up not just text names and page or line numbers but a chunk of surrounding text for each hit, so you can see and compare the words “in situ.”

You need only keep all your Sanskrit digital texts in a folder (along with any number of nested subfolders) and direct the editor’s search engine to search that entire folder (or any given subfolder) for a given string occurring any all the files contained therein.

Of course you can use Finder on Mac to search folders or your entire drive for a particular string, but GREP allows searching using “regular expressions” (see https://s3.amazonaws.com/BBSW-download/BBEdit_14.0_User_Manual.pdf, ch. 8 = pp. 189-222), to get maximally complete results despite variations in encoding, wording, spelling, sandhi,  etc., and find to multiple strings occurring in proximity to each but with a variable number of intervening characters, etc., etc.

Best,
Tim


_________________________________________
Timothy Lubin
Jessie Ball duPont Professor of Religion and Adjunct Professor of Law
204 Tucker Hall
Washington and Lee University
Lexington, Virginia 24450
American Council of Learned Societies fellow, 2020–21
National Endowment for the Humanities fellow, 2020–21
https://lubin.academic.wlu.edu/<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flubin.academic.wlu.edu%2F&data=04%7C01%7CLubinT%40wlu.edu%7C118620c8eb3b4049237308d886c1df18%7Cd1a80622a99943e58eb67873905e939e%7C1%7C0%7C637407514521888642%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KGZJIHllkEOJZN9s48rB6YkrExmYG1owecyuPn%2FuR%2Bg%3D&reserved=0>
http://wlu.academia.edu/TimothyLubin<https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwlu.academia.edu%2FTimothyLubin&data=04%7C01%7CLubinT%40wlu.edu%7C118620c8eb3b4049237308d886c1df18%7Cd1a80622a99943e58eb67873905e939e%7C1%7C0%7C637407514521888642%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=etrMzh0RHx8819v5PH6KeTgeHQpeNVqeSUP62IDVn9c%3D&reserved=0>
https://ssrn.com/author=930949<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fssrn.com%2Fauthor%3D930949&data=04%7C01%7CLubinT%40wlu.edu%7C118620c8eb3b4049237308d886c1df18%7Cd1a80622a99943e58eb67873905e939e%7C1%7C0%7C637407514521888642%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=F9JfpSkLrSfrImfMeIXPIjpUIVYIYcwfbvm8dqcxedE%3D&reserved=0>
https://dharma.hypotheses.org/people/lubin-timothy<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdharma.hypotheses.org%2Fpeople%2Flubin-timothy&data=04%7C01%7CLubinT%40wlu.edu%7C118620c8eb3b4049237308d886c1df18%7Cd1a80622a99943e58eb67873905e939e%7C1%7C0%7C637407514521898628%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=sncUovdIh9wA0ezo8n2xpYpllaMKMetH86tMA6Jtg9A%3D&reserved=0>






From: INDOLOGY <indology-bounces at list.indology.info> on behalf of INDOLOGY <indology at list.indology.info>
Reply-To: Arjuna S R <srarjunaa at gmail.com>
Date: Friday, September 17, 2021 at 7:15 PM
To: Madhav Deshpande <mmdesh at umich.edu>
Cc: INDOLOGY <indology at list.indology.info>
Subject: Re: [INDOLOGY] Grep tool for searching on Mac

Dear Sir,

This link will help you know about 'grep' - http://qpeng.org/computer/grep.htm<https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fqpeng.org%2Fcomputer%2Fgrep.htm&data=04%7C01%7Clubint%40wlu.edu%7Cc70ec92367da466411ca08d979feb9b7%7Cd1a80622a99943e58eb67873905e939e%7C1%7C0%7C637674957207006248%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=XnbS23LaM0dTX5ZFeCnVYBhvaGSXx4g%2BbK4Kx5F%2FUrQ%3D&reserved=0>

Thank you.

Regards,
Arjuna

On Fri, 17 Sept 2021 at 21:30, Madhav Deshpande via INDOLOGY <indology at list.indology.info<mailto:indology at list.indology.info>> wrote:
To confess my ignorance, what exactly does GREP do? I use a MacBook. What would I need GREP for? Please enlighten me.

Madhav M. Deshpande
Professor Emeritus, Sanskrit and Linguistics
University of Michigan, Ann Arbor, Michigan, USA
Senior Fellow, Oxford Center for Hindu Studies
Adjunct Professor, National Institute of Advanced Studies, Bangalore, India

[Residence: Campbell, California, USA]


On Fri, Sep 17, 2021 at 8:20 AM Peter Wyzlic via INDOLOGY <indology at list.indology.info<mailto:indology at list.indology.info>> wrote:
Dear all,

just for the record: MacOS has also a classical command line grep. So, technically speaking, you do not necessarily need an extra program. It requires plain text files, however.

All the best
Peter Wyzlic
Am 17.09.2021 um 14:21 schrieb Lubin, Tim:
BBEdit is most common for grepping on Mac, but some other editors do it, e.g., Oxygen xml editor.
Before I switched to Mac, I used Examine64 for grep searches:
https://www.examine64.com/<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.examine64.com%2F&data=04%7C01%7Clubint%40wlu.edu%7Cc70ec92367da466411ca08d979feb9b7%7Cd1a80622a99943e58eb67873905e939e%7C1%7C0%7C637674957207006248%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OOEXd%2FcXTQveafYKY3TSkJkP%2Bwbd36UuM0MpuuS6sCQ%3D&reserved=0>
As I recall, it could even search binary files (e.g., docx, rtf, pdf), which BBEdit cannot do.

Best,
Tim Lubin

From: INDOLOGY <indology-bounces at list.indology.info><mailto:indology-bounces at list.indology.info> on behalf of INDOLOGY <indology at list.indology.info><mailto:indology at list.indology.info>
Reply-To: Sven Sellmer <sellmers at gmx.de><mailto:sellmers at gmx.de>
Date: Friday, September 17, 2021 at 1:33 PM
To: Harry Spier <vasishtha.spier at gmail.com><mailto:vasishtha.spier at gmail.com>
Cc: INDOLOGY <indology at list.indology.info><mailto:indology at list.indology.info>
Subject: Re: [INDOLOGY] Grep tool for searching on Mac

On a Mac, BBEdit does "grep" multifile search.

Best wishes,
Sven

Am 17.09.2021 um 13:30 schrieb Harry Spier via INDOLOGY <indology at list.indology.info<mailto:indology at list.indology.info>>:


Most good text editors have both a "find in files" feature that allows you to search in multiple files or whole directories at a time and also have a "regular expressions" feature that allow you to do what you call "grep" searchs.  I use notepad++ on windows but I can't give you the name of a text editor for Mac as I'm not a Mac user.  The Muktabodha digital library searchable etext library has that feature built in, but only for use on its searchable etext collection.
Harry Spier


On Fri, Sep 17, 2021 at 7:19 AM Krishnaprasad G via INDOLOGY <indology at list.indology.info<mailto:indology at list.indology.info>> wrote:
Dear all
Is there any readymade tool for using the Grep command for Sanskrit text string for multiple files?

Thanks

_______________________________________________
INDOLOGY mailing list
INDOLOGY at list.indology.info<mailto:INDOLOGY at list.indology.info>
https://list.indology.info/mailman/listinfo/indology<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist.indology.info%2Fmailman%2Flistinfo%2Findology&data=04%7C01%7Clubint%40wlu.edu%7Cc70ec92367da466411ca08d979feb9b7%7Cd1a80622a99943e58eb67873905e939e%7C1%7C0%7C637674957207006248%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=pwDX%2BPnD3X3TUYjJCF94R%2Bf2RGOTmm8EDkJwhaBd9jE%3D&reserved=0>

_______________________________________________
INDOLOGY mailing list
INDOLOGY at list.indology.info<mailto:INDOLOGY at list.indology.info>
https://list.indology.info/mailman/listinfo/indology<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist.indology.info%2Fmailman%2Flistinfo%2Findology&data=04%7C01%7Clubint%40wlu.edu%7Cc70ec92367da466411ca08d979feb9b7%7Cd1a80622a99943e58eb67873905e939e%7C1%7C0%7C637674957207016204%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=LFbqlT45VSHxMrob4uybbGdaCjD1a%2BVU9ECdYRr%2B2%2BU%3D&reserved=0>




_______________________________________________

INDOLOGY mailing list

INDOLOGY at list.indology.info<mailto:INDOLOGY at list.indology.info>

https://list.indology.info/mailman/listinfo/indology<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist.indology.info%2Fmailman%2Flistinfo%2Findology&data=04%7C01%7Clubint%40wlu.edu%7Cc70ec92367da466411ca08d979feb9b7%7Cd1a80622a99943e58eb67873905e939e%7C1%7C0%7C637674957207016204%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=LFbqlT45VSHxMrob4uybbGdaCjD1a%2BVU9ECdYRr%2B2%2BU%3D&reserved=0>



--

Universität Bonn

Institut für Orient- und Asienwissenschaften

Bibliothek

Brühler Str. 7

D-53119 Bonn

Tel.: 0228/73-62436

_______________________________________________
INDOLOGY mailing list
INDOLOGY at list.indology.info<mailto:INDOLOGY at list.indology.info>
https://list.indology.info/mailman/listinfo/indology<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist.indology.info%2Fmailman%2Flistinfo%2Findology&data=04%7C01%7Clubint%40wlu.edu%7Cc70ec92367da466411ca08d979feb9b7%7Cd1a80622a99943e58eb67873905e939e%7C1%7C0%7C637674957207026159%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=n9aPHSIOkYbe5awnjRzKS8uuk2X7ZGtEK9a3V099LDo%3D&reserved=0>

_______________________________________________
INDOLOGY mailing list
INDOLOGY at list.indology.info<mailto:INDOLOGY at list.indology.info>
https://list.indology.info/mailman/listinfo/indology<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist.indology.info%2Fmailman%2Flistinfo%2Findology&data=04%7C01%7Clubint%40wlu.edu%7Cc70ec92367da466411ca08d979feb9b7%7Cd1a80622a99943e58eb67873905e939e%7C1%7C0%7C637674957207026159%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=n9aPHSIOkYbe5awnjRzKS8uuk2X7ZGtEK9a3V099LDo%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://list.indology.info/pipermail/indology/attachments/20210917/770182ad/attachment.htm>


More information about the INDOLOGY mailing list