Skip to main content

All Questions

Tagged with
1 vote
1 answer
37 views

(standart input) shown instead file name with grep -iHn "ERROR" and a second grep -vH "filter" shows (standard input) and no longer the file name

What I try to do: Find all log files from this day Then grep "ERROR" in the files Then grep -v "Not this line containing the filter" as Filter in result of the first grep command ...
falcon68's user avatar
0 votes
1 answer
31 views

Bash command substitution issues

I'm writing a Python script to parse various logs across different hosts. I can successfully run bash scripts via Python's subprocess module, however, I want to minimize the number of ssh calls, so I'...
OM222O's user avatar
  • 980
0 votes
1 answer
50 views

Recursive search and replace a string with dot in text files on Mac

Team, I see there are multiple similar questions but I did try some answers and still not able to get what I want. I want to replace a text as "product-ui-test-creds.json" to "vaulted-...
AhmFM's user avatar
  • 1,744
0 votes
1 answer
68 views

How to create a "variable" group (for future reference via \n) in extended grep regex type (how not to repeat myself)?

Result: I wanted from regex what it is not intended for. If you don’t find a function in regex, then most likely it’s not there. Regex for simple cases Note: I want the solution to work even if ...
Empty's user avatar
  • 25
0 votes
2 answers
37 views

jQuery - find object in array of objects based on partial match of one element

I have an array of objects, with one element being comma separated list of values. When a new object is created, I want to check if there is an object in the array that, among other things, might ...
NoBullMan's user avatar
  • 2,160
-1 votes
1 answer
149 views

How to solve issue Argument list too long in grep command? [closed]

How to solve issue Argument list too long in grep command? I need to execute grep command grep '^ORA' '/log/bssuser/CDR/Postpaid_CDR_Log/'*.log > output.txt I have error : -bash: /usr/bin/xargs: ...
Amany Abd Elmnem's user avatar
-2 votes
4 answers
108 views

How to use Bash to grep, excluding some patterns, and including others?

In the file find.out I want to grep and find lines that have 'FinancePlus', 'Sungard' and 'Pentamation' and I want to exclude lines containing 'PROPRIETARY, 'CONFIDENTIAL', 'Public' I can get the part ...
user5586678's user avatar
0 votes
2 answers
291 views

How to find only file names that contain a specific string?

I have a list of for then 1000 files. and I have a list of strings (additional.txt) that I would like to look up in all those files in current directory. That list (more than 1000 entries) looks like ...
anikaM's user avatar
  • 429
0 votes
0 answers
59 views

Using grep with multiple strings but each string needs to have a seperate output

Is it possible to use grep to look for specific strings, and have output file for each matched string. ( I use cygwin ) What I want to do in details: Look into only specific files which can be .txt ...
carouselcarousel's user avatar
0 votes
2 answers
302 views

bash: How to use 'find' combined with '-exec grep' to search for an empty pair of braces

I know there are other ways to accomplish this, but I'm curious, bear with me. I would like to search a directory tree for JSON manifest files containing the exact string: "submodules": {}, ...
Johan Bezem's user avatar
  • 2,585
-3 votes
1 answer
37 views

Print the result of string after a particular key word

Below output is an one liner output, where ma-name & emailID are common values. I would need to print the next values of ma-name & emailID parallel one after the other. please suggest a way ...
Surendar 's user avatar
0 votes
1 answer
192 views

How to get deployment name in all namespaces with specific secret used/containing specific text on the deployment yaml?

I've tried using grep but only secret name showing up, kindly help please , thank you kubectl get secret --all-namespaces -o yaml | grep <secretname>
Adam Network's user avatar
0 votes
2 answers
95 views

bash - how to grep a string within a file and index with the file name

I have a few thousand files each within their own folder and I want to link a specific string ID with the file name. So for example here I have a couple of different folders : Folder_1 file_abc.txt ...
vanish007's user avatar
  • 323
0 votes
1 answer
1k views

How to Exclude Directories from grep command in linux?

I Am trying to exclude directories from grep matches, i have tried with --exclude-dir=PATTERN method. But its not working. ls | grep -E "^Acct" --exclude-dir=Acct File Structure Acct/ --->...
Ramesh Thiyagarajan's user avatar
1 vote
1 answer
41 views

to Avoid catching similar folder names

I'm doing a bash script and it needs to be generated first a text file with the paths that it will run the script. However, there are some paths that are similar in name and the grep command does not ...
ryse's user avatar
  • 13

15 30 50 per page
1
2 3 4 5
36