halvar.at bcom Python Tools Plone Zope Visual Basic Programmierung SW3 PC Computer Netzwerk Linux Windows Shop

Skip to content

Gerolds Homepage

Sections
Personal tools
You are here: Home Codeschnipsel Textsuche (findstring) Textsuche unter Linux (findstring)
Document Actions

Textsuche unter Linux (findstring)

Kleines Shellprogramm, mit dem ich gerne nach Textstellen in Dateien suche

#!/bin/sh

#
# Sucht nach Dateien in denen der Suchstring vorkommt
#

find -type f -exec grep -iq "${1}" {} \; -print
Und so könnte es aussehen, wenn man nach dem Begriff ``searchForMembers`` unterhalb eines Zope-Produkt-Ordners sucht:
gp-server Products # findstring searchForMembers
./CMFPlone/HISTORY.txt
./CMFPlone/MembershipTool.py
./CMFPlone/skins/plone_forms/folder_localrole_form.pt
./CMFPlone/skins/plone_forms/member_search_results.pt
./CMFPlone/skins/plone_forms/ownership_form.cpt
./CMFPlone/skins/plone_prefs/prefs_user_group_search.py
./CMFPlone/skins/plone_prefs/prefs_users_overview.cpt
./CMFPlone/tests/testMembershipTool.py
./CMFPlone/MembershipTool.pyc
./GroupUserFolder/PloneFeaturePreview.py
./GroupUserFolder/skins/gruf_plone_2_0/folder_localrole_form.pt
./GroupUserFolder/PloneFeaturePreview.pyc
./PlonePAS/tests/test_basic_ops.py
./PlonePAS/tools/membership.py
./PlonePAS/tools/membership.pyc
./ATTest/Member5.py
./ATTest/Member5.pyc
gp-server Products #
 

Powered by Plone   Powered by Bcom   Powered by Gentoo-Linux

Diese Seite erfüllt evt. :-) folgende Standards: