bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search in specific file type


From: Shigio YAMAGUCHI
Subject: Re: Search in specific file type
Date: Tue, 17 Nov 2015 10:30:19 +0900

Hi,
You can do it using the following command line:

$ global -P '\.cpp$' | global -L- -gx foo

This command line searches 'foo' in cpp files.

1. "global -P <pattern>" makes a find(1) like file list.
2. "global -L- -g" read a file list from standard input
   instead of arguments and grep them.

Regards,
Shigio


2015-11-17 3:14 GMT+09:00 Akshay sundarraj <address@hidden>:
Hi Global Team,

I would like to know whether there is an option to grep in specific file type.

"global -g[aEGilMnoOqtvVx][-L file-list][-S dir][-e] pattern [files]"

can be used to grep for pattren in [files].

But I would like to use global -g on specific file types for e.g *.cpp files.

Is there any option/way to filter out this?


Thanks & Regards,
Akshay

_______________________________________________
Bug-global mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-global




--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]