Author Topic: Grep request [Solved]  (Read 132 times)

Offline satuser083

  • Hero Member
  • *****
  • Posts: 510
Grep request [Solved]
« on: March 14, 2013, 06:04:19 AM »
Can anyone help me out, with the grep-syntax for searching in hidden-files?  No matter what I try, grep just appears to ignore these .* files  >:( . Thanks.
« Last Edit: March 15, 2013, 05:41:42 AM by satuser083 »

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10622
  • MLUs Forever!
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline satuser083

  • Hero Member
  • *****
  • Posts: 510
Re: Grep request
« Reply #2 on: March 15, 2013, 05:40:36 AM »
http://www.linuxquestions.org/questions/linux-newbie-8/grep-does-not-care-about-file-names-beginning-with-period-684478/

The
Code: [Select]
shopt -s dotglob   # allow bash to match a '.' at the start of the (hidden) name/directory 
... commands ...
shopt -u dotglob   # reset bash (disallow finding '.' files/dirs)

combination seems to have fixed it  :) .

Many thanks for the info.  ;D .

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10622
  • MLUs Forever!
Re: Grep request [Solved]
« Reply #3 on: March 15, 2013, 05:44:09 AM »
;)  Glad it helped
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT