Tagged Questions
3
votes
3answers
116 views
Longest common substring using grep
I have a huge text file called dictionary.txt with entries like
ABC_SEQ_NUM This represents....
ABC_RANK This represents....
ABC_BSC_ID This represents...
PQR_TA_DATE_AF This ...
1
vote
1answer
56 views
Tools to dump entries from arbitrary sets of log files between 2 dates
I had a outage incident a few days ago and the support team has asked for any available logs for the period, while thinking about how to do this, it occurred to me that it would be generally handy to ...
4
votes
2answers
126 views
How to search and replace multiple needles by one word via one expression?
Assume you have a text file:
foo fnord bar
bizz foo poit
And now I would want to replace both "foo" and "bar" into "narf".
I know I could use:
sed -e 's/foo/narf/g' -e 's/bar/narf/g' fileName
...
6
votes
4answers
124 views
Fastest way to determine if two sorted lists contain unique elements
I have two sorted files A and B where the size of A is much greater than B, e.g. A is 100GB while B is 50MB. I want to quickly determine if there are any lines in B that are contained in A, stopping ...
3
votes
5answers
179 views
How to replace a list of placeholders in a text file?
I have a text (configuration) file, but the program that reads the file unfortunately doesn't allow using any kind of variables. So I'd like to use a preprocessor that replaces a set of placeholders ...
3
votes
1answer
278 views
Is there a search utility which can binary split search a large sorted (sequential) text file?
Yes, I know it sounds odd. Sequential and Binary-splits don't mix.. That is unless the sequence is the byte offset within the file itself...
I've scrambled together a binary split search in bash ...