2010年12月30日 星期四

找尋含有A字串在B檔案的目錄路徑並顯示出來

  • 找尋當目錄下所有Android.mk含有BOARD_HAVE_BLUETOOTH字串


find . -type f -name "Android.mk" -print0 | xargs -0 grep "BOARD_HAVE_BLUETOOTH"


./system/netd/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./system/bluetooth/brcm_patchram_plus/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH_BCM),true)
./system/bluetooth/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./frameworks/base/libs/audioflinger/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./frameworks/base/libs/audioflinger/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./frameworks/base/libs/audioflinger/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./frameworks/base/core/jni/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/msm7k/libaudio-qsd8k/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/msm7k/libaudio-qsd8k/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/msm7k/libaudio/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/msm7k/libaudio/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/alsa_sound/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/alsa_sound/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./external/bluetooth/glib/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./external/bluetooth/hcidump/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./external/bluetooth/bluez/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./external/bluetooth/bluez/common/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH_BCM),true)
./external/bluetooth/bluez/common/Android.mk: -DBOARD_HAVE_BLUETOOTH_BCM


  • 找尋當目錄下所有Android.mk含有BOARD_HAVE_BLUETOOTH字串的目錄路徑



find . -type f -name "Android.mk" -print0 | xargs -0 grep "BOARD_HAVE_BLUETOOTH" | sed -e 's/\/[^/]*$//'


./system/netd
./system/bluetooth/brcm_patchram_plus
./system/bluetooth
./frameworks/base/libs/audioflinger
./frameworks/base/libs/audioflinger
./frameworks/base/libs/audioflinger
./frameworks/base/core/jni
./hardware/msm7k/libaudio-qsd8k
./hardware/msm7k/libaudio-qsd8k
./hardware/msm7k/libaudio
./hardware/msm7k/libaudio
./hardware/alsa_sound
./hardware/alsa_sound
./external/bluetooth/glib
./external/bluetooth/hcidump
./external/bluetooth/bluez
./external/bluetooth/bluez/common
./external/bluetooth/bluez/common


  • 找尋當目錄下所有Android.mk含有BOARD_HAVE_BLUETOOTH字串的目錄路徑



find . -type f -name "Android.mk" -print0 | xargs -0 grep "BOARD_HAVE_BLUETOOTH" | sed -e 's/\/[^/]*$//' | uniq


./system/netd
./system/bluetooth/brcm_patchram_plus
./system/bluetooth
./frameworks/base/libs/audioflinger
./frameworks/base/core/jni
./hardware/msm7k/libaudio-qsd8k
./hardware/msm7k/libaudio
./hardware/alsa_sound
./external/bluetooth/glib
./external/bluetooth/hcidump
./external/bluetooth/bluez
./external/bluetooth/bluez/common


透過Facebook分享

沒有留言: