Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


さとうふみやす @ OSSTech です。

At Tue, 04 Nov 2014 17:13:00 +0900,
TANAKA Hidemune wrote:
以下のようなスクリプトを使って、
allfind.sh
------------------------------------------
#!/bin/bash

find ./ -name "*" -exec grep 2>/dev/null -H "$1" {} \;
------------------------------------------

  find ./ -name "*" -exec grep 2>/dev/null -H "$1" {} +

とすると、もっと効率的で速いですよ。

  find ./ -type f -exec grep -H "$1" {} +

でいいような気も。

  find ./ -type f -exec grep -H -- "$1" {} +

とすればハイフンで始まるパターンも検索可能。
  
-- 
-- Name: SATOH Fumiyasu @ OSS Technology Corp. (fumiyas @ osstech co jp)
-- Business Home: http://www.OSSTech.co.jp/
-- GitHub Home: https://GitHub.com/fumiyas/
-- PGP Fingerprint: BBE1 A1C9 525A 292E 6729  CDEC ADC2 9DCA 5E1C CBCA

-- 
Unsubscribe instructions: E-mail to discuss+unsubscribe@ja.libreoffice.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/ja/discuss/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.