find string in my files

Linux specific forum
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

find string in my files

Post by Brujah »

Hy folks,

sometimes I have the problem that I can't remember in which files I use a specific variable.
So I want to display all files that include this string and it would be great to display the lines of code too.

I tried
cat *.pb ! grep variable

But in this way I can't find out the filenames.

Is there another way to do it ?

Markus
Saboteur
Enthusiast
Enthusiast
Posts: 273
Joined: Fri Apr 25, 2003 7:09 pm
Location: (Madrid) Spain
Contact:

Post by Saboteur »

grep variable *.pb
[:: PB Registered ::]

Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

cat *.pb | grep veriable
8O
Post Reply