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
2 answers

Socket.io: Error: Callbacks are not supported when broadcasting at Socket.emit

I successed to send ack to android client from nodejs server but I don't succeed to do reverse. I have this error: Callbacks are not supported when broadcasting at Socket.emit Serveur nodejs: socket.broadcast.to(socketid).emit('message', data,…
Réda Youssoufi
  • 147
  • 1
  • 12
0
votes
1 answer

ignore *.egg-info directories with ack-grep

I've noticed that ack-grep doesn't ignore the .egg-info directory that python creates alongside the source code. I was hoping I could add --ignore-dir=*.egg-info or --ignore-file=ext:egg-info as a catchall without having to add each…
penchant
  • 2,263
  • 3
  • 14
  • 20
0
votes
1 answer

How can I find and replace with a variable using a list of filenames piped to sed?

Currently I find and replace using the following: ack -l oldstring | xargs sed -i '' -e s/oldstring/newstring/g Is there a way to do this without having to type out oldstring more than once? This is what I'm trying that does not work: ack -l…
YPCrumble
  • 26,610
  • 23
  • 107
  • 172
0
votes
1 answer

How can I run "ack" in bash and save the output to a file?

I have the following test.txt file with two lines keyword 1, 2010-10-01 | 1 | 2 | 3 | 4 keyword 2, 2010-10-01 | 1 | 2 | 3 | 4 and would like to ack for keyword1 and keyword2. I call this…
tenticon
  • 2,639
  • 4
  • 32
  • 76
0
votes
2 answers

Vim - quickfix window size issue (ack.vim)

I'm using ack.vim. It's working finely, except a quickfix window's stange behavior. After searching done, I can open a file from the results listed on quickfix window. There are several ways to open. Usualy i go with typing o (Open), v (Vertical…
dosuken123
  • 438
  • 3
  • 7
  • 19
0
votes
1 answer

Conditional grep/ack searches?

What I mean by this is that I want to search for "thing1", and then I want to search for "thing2" based on the position of the "thing1". And I want to display both of them in the result in the order that they are in the coede. eg. I find "thing1" on…
Jonny Shanahan
  • 351
  • 3
  • 13
0
votes
1 answer

Why is Ag slower than grep?

So recently I was searching on command line tools that perform fast search and I stumbled upon a lot . Out of those it is my understanding that Ag is reportedly faster than grep, ack, and sift. With grep being the slowest. now I have 300.000…
RetroCode
  • 342
  • 5
  • 14
0
votes
1 answer

Sorting files based on content in bash

I take notes using markdown, and save them in the following structure $NOTESDIR - preface.md - styling.tex + YR1 + sem1 - "LinAlgDat - Transformations and matrices.md" + sem2 - "PoP - something fancy.md" + YR2 + sem3 …
user5455572
0
votes
1 answer

Get all tags which do not contain a rel="nofollow"

I've written a small command to find all files which contain external url's, using ack and open them in sublime, so I can do a find and replace on all tags and add a rel="nofollow": sublime $(ack -l ']+href="http') But now I would like to make…
Erik van de Ven
  • 4,747
  • 6
  • 38
  • 80
0
votes
2 answers

python use of ack in combination with tkinter

Im kinda stuck. i want to "ack" in a directory and print the list of the ack in the terminal. but when i try to run my script it only ack's in the current directory. im using tkinter to create the tkFileDialog.askdirectory() however, im still…
NoFxor
  • 19
  • 1
  • 8
0
votes
1 answer

Is there a way to ignore file path using ack?

Lets say I have a folder with files like the one below: . |__ components | |__ index.js | |__ _index.js | |__ _index.en.js | |__ _.js What I want is to search in components/index.js and in _.js and ignore all the components/_*.js…
chestozo
  • 1,203
  • 1
  • 12
  • 29
0
votes
1 answer

Can't find a result with The Silver Searcher at a certain depth

I'm getting some odd behaviour with The Silver Searcher that I just discovered when looking for a line in my code base. In the root folder, I call % ag branding_black_with_bundles % ag --depth -1 branding_black_with_bundles and get nothing.…
socksy
  • 13
  • 1
  • 4
0
votes
1 answer

ack.pl tool and ack.pl flags + how to ignore type of files

I am using the ack.pl tool in order to search string or IP’s in files The official site of ack.pl is - http://beyondgrep.com/documentation/ Example of ack.pl CLI ( want to find the string STRING_TO_FIND in files under /etc ) /tmp/ack.pl -Q -a -l…
maihabunash
  • 1,632
  • 9
  • 34
  • 60
0
votes
4 answers

How to show progress of ack-grep

I use "ack-grep" to search for a specific content within a large number of files. Because the search takes a very long time, I would like to see the status of the search. For example: It would be very useful, if ack-grep would print out the actual…
Lui
  • 159
  • 9
0
votes
1 answer

NERDTree-ack Error

I'm unable to get the NERDTree-ack plugin working; when I attempt to search from NERDTree I am met with the following error: Enter the pattern: ack.txtError detected while processing function…
autodidacticon
  • 1,310
  • 2
  • 14
  • 33