Questions tagged [ack]

ack is a tool like grep, designed for programmers with large trees of heterogeneous source code.

ack is a tool like grep, designed for programmers with large trees of heterogeneous source code. http://beyondgrep.com

262 questions
0
votes
3 answers

getting an error with ack trying to associate a file to javascript

in my ~/.ackrc I have this line: --type-add=javascript=.pkg Now when I try to run ack foo I get an error: $ ack foo ack: --type-add: Type "javascript" does not exist, creating with ".pkg" ... What does this mean? and how do I fix it.
chovy
  • 72,281
  • 52
  • 227
  • 295
0
votes
1 answer

Client ack with MDB

As far as I know there is only AUTO_ACKNOWLEDGE and DUPS_OK_ACKNOWLEDGE possible with MDB. I would like to have something like CLIENT_ACKNOWLEDGE to avoid XA transactions. Basically what I want: get a message --> start local transaction --> perform…
androdevo
  • 752
  • 1
  • 8
  • 17
0
votes
1 answer

TextMate: Find in Files seems to have out-of-date cache (maybe because of AckMate?)

I have installed AckMate a while ago, and the problem I describe here never happened to me before, so maybe it's because of AckMate...? Here we go: often when I'm searching inside a project, TextMate finds occurrences of the search pattern in "old…
Joshua Muheim
  • 12,617
  • 9
  • 76
  • 152
0
votes
1 answer

How do I return a portion of a string with ack (or an equivalent)?

I have a line in a file that looks like this: $db['foo']['database'] = 'bar'; I want to use ack or grep or something to return bar out of that string. So far I have: ack '^\$db\['\''foo'\''\]\['\''database'\''\] = '\''([\w_]+)'\' $file But don't…
futuraprime
  • 5,468
  • 7
  • 38
  • 58
0
votes
1 answer

How to replace some characters and EOF in file

In some PHP files, I want to replace "?>\s\t\n\EOF". I test this for search all files where this problem occurred using: ack "\?\>[\s\n\t]+\z" I take result but I want replace this by ?>EOF only. I test another command with "sed": sed…
Herve
  • 127
  • 4
-1
votes
0 answers

Ack won't match pattern in git hook script

I've written a git pre-commit hook for the purpose of disallowing commits which include paths to local files. Often git users forget to replace local paths with ones relevant to the server before committing and pushing, and each time this happens…
Sam Tuke
  • 317
  • 2
  • 9
-1
votes
2 answers

Finding a string within a file and outputting results

I would like grab one line (1 term) at a time from file1.txt and search sFile.txt... outputting all the lines that have the found term in it. file1.txt (300 lines) sFile.txt (100k lines). I would like to use a command line (linux) fgrep, ack, find,…
acctman
  • 4,229
  • 30
  • 98
  • 142
1 2 3
17
18