All Questions
7
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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' | ...