Tagged Questions

7
votes
3answers
94 views

How pipe the output of “tab complete”?

When using commands in bash I like the double tab option to display the available commands. Some commands have more possible matches than others: Is there a way I can pipe the output of the double ...
-2
votes
1answer
30 views

Linux “rpl” command doesn't replace text [closed]

I'm using rpl program in linux to replace date( with pdate( in some files. But it says A Total of 0 matches replaced in 1 file searched. while grep output for date( is: ...
0
votes
1answer
82 views

What does ^> mean in a grep pattern?

What does this command do? grep "<[^>]*>" inuux.xml What is searching for?
3
votes
1answer
197 views

What does \bi\b mean in a grep pattern?

What does this command do? grep "\bi\b" linux.txt What is it searching for?
2
votes
4answers
77 views

How to search for a word in entire content of a directory in linux

need to search for something in entire content I am trying: find . | xargs grep word I get error: xargs: unterminated quote How to achieve this? Thanks.
0
votes
3answers
94 views

Use “grep” to match text in multiple files

I have data in multiple files. I want to find some text that matches in all files. Can I use the grep command for that? If yes then how?
1
vote
4answers
121 views

tee and grep at the same time (shell)?

I'm trying to run a server that writes to $log (a txt file) and then find all the text in the logfile that starts with '[1]' and put it in another file. Here's my attempt. tee -a $log works along with ...
2
votes
2answers
76 views

How costly is case insensitive search as compared to case sensitive search?

I dont think grep -i is exponentially (wrt to the number of characters to be grepped) more costly (time wise) than a normal grep because the run times are not too different. But theoretically it ...
5
votes
1answer
79 views

Search for a text in Linux but don't display the complete line in results

I'm using grep to do this, like: grep someText file.log But this returns the complete line in results. If someText is found in the middle of a line I don't want to ouput the whole line, just the ...
4
votes
3answers
430 views

Finding a substring in files across subdirectories with a single built-in command?

In Windows, if I wanted to find a string across all files in all subdirectories, I would do something like findstr /C:"the string" /S *.h However, in Linux (say, Ubuntu) I have found no other way ...
12
votes
2answers
653 views

Does grep use a cache to speed up the searches?

I have noticed that subsequent runs of grep on the same query (and also a different query, but on the same file) are much faster than the first run (the effect is easily noticeable when searching ...
2
votes
0answers
126 views

How to generate a report summary of messages that triggered a specific DSN code

CENTOS 5.x | Sendmail Hello All, I hope this is a simple question. =) I need to generate a report summary of messages that triggered a specific DSN code. For example: Jan 11 07:43:34 ...