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
  • 12
    Pipelines of many simple tools (specifically the mentioned ones, like head, tail, grep, sort, cut, tr, sed, ...) are often used unnecessarily, specifically if you already also have an awk instance in that pipeline which can do the tasks of those simple tools as well. Another issue to be considered is that in pipelines you cannot simply and reliably pass state information from processes at the front side of a pipeline to processes that appear on the rear side. If you use for such pipelines of simple programs an awk program you have a single state space. Commented Mar 3, 2015 at 5:54
  • 2
    Setting LC_ALL is over-used, as it overrides all possible locale settings, not just the ones that affect input parsing. To make sure that sort works consistently, LC_COLLATE=C is the appropriate setting. That said, LC_ALL=C.UTF-8 has identical sorting as C, and doesn't break tools that need to treat Unicode characters as such. Commented Jun 30, 2022 at 12:21