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*

4
  • Drop the cat, it seems to be able to find its way in absolutely everywhere where it's not supposed to be. Commented Feb 5, 2018 at 15:15
  • It was just for developing purposes. As you don't know what commands you'll have to insert in the piping, I always start with the cat. Afterwards you can add the file information to the first command. Commented Feb 5, 2018 at 15:19
  • @Kusalananda cats are like that. However, depending on the scenario, the OP might want to use unbuffer and/or xargs or parallel to reduce dead times and improve performance. Commented Feb 5, 2018 at 16:04
  • That while loop doesn't appear to add any value. How about mysql | sed '2,$s#...#...#g' and dispense with the grep too. Commented Feb 5, 2018 at 17:48