The Beauty of Unix Pipelines
Unix pipelines are cool and I am all for it. In recent times however, I see that sometimes they are taken too far without realizing that each stage in the pipeline is a process and a debugging overhead in case something goes wrong.<p>A case in point is this pipeline that I came across in the wild:<p>TOKEN=$(kubectl describe secret -n kube-system $(kubectl get secrets -n kube-system | grep default | cut -f1 -d &#x27; &#x27;) | grep -E &#x27;^token&#x27; | cut -f2 -d&#x27;:&#x27; | tr -d &#x27;\t&#x27; | tr -d &quot; &quot;)<p>In this case, perhaps awk would have absorbed 3 to 4 stages.