Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    You mean the file would contain the literal string Key = 0? Commented Aug 11, 2020 at 19:22
  • 4
    The output of grep would include the filename and the line containing the string so instead of passing it to rm, it would just run the rm command on * which is everything in the directory and it would delete the files and give an error for directories because the -r switch isn't used. Do you want to delete the files that have that string in their contents? If so, provide an example of what it might look like. Do you also want to delete files that have Key = 01 or MyKey = 05? Commented Aug 11, 2020 at 19:28