Skip to main content

All Questions

3 votes
2 answers
585 views

How to subtract number in previous line from current line's using grep?

I use grep to get the output of mysqladmin as sudo mysqladmin ext -i10 | grep 'buffer_pool_pages_flushed' and the output is continuous (every 10 seconds) as | Innodb_buffer_pool_pages_flushed ...
Googlebot's user avatar
  • 1,959
1 vote
1 answer
106 views

Search for files using terminal and open with preferred program when clicked?

I would like to somehow create links to files within the terminal from search results found when searching files. Same way you would click a hyperlink within the terminal, but in this case it would be ...
Anonymous's user avatar
  • 533
1 vote
2 answers
985 views

Grep versus spotlight on mac

I'm a newly minted CS major and I have been wondering what the benefits of using grep versus spotlight on mac. I ran a command to search for a specific file because I lost track of which directory it ...
Bones223's user avatar
1 vote
0 answers
466 views

Highlight specific text in command output, allowing interaction with the command

Is there a grep -like command to highlight specific text in a command's output, but shows all lines irrespective of the presence of the desired text and allows one to interact with the piped(1) or ...
user208145's user avatar
  • 2,535
1 vote
3 answers
3k views

Grep something specific of the results of last execution?

I've installed some utilities from the CLI and got quite a long verbose output describe what was installed directly, what needed some dependencies, what is no longer needed to be installed, etc. Is ...
user avatar
1 vote
1 answer
68 views

Recursively find files that have a percentage of lines in common

Is possible to recursively find files that have a percentage of lines in common? I want an output where I have only files that are 50% the same of others or have 20+ lines in common. I'm trying to ...
devin's user avatar
  • 111
1 vote
1 answer
856 views

Why "grep -q -v" only works with single line input?

If I use grep -q in combination with -v to return 0 if there are no matches or 1 if there is a match, it works as long as input is a single line: $ echo 'abc' | grep -q -v a; echo $? 1 $ echo 'abc' | ...
Thunderbeef's user avatar