Wgląd w konsolowy pipe

Kontynuując temat sprawnego używania terminala. Czasem przy pisaniu pipe’a brakuje podglądu tego, co dzieje się między krokami:

curl http://localhost:8080/admins | awk get-username.awk | ./delete.sh

Łatwym sposobem wydrukowania danych na danym etapie jest użycie tee podłączonego do stderr:

curl http://localhost:8080/admins | awk get-username.awk | tee /dev/stderr | ./delete.sh

Bonusowy content: linki do materiałów do uczenia się obsługi shella.

Creative Commons License
Except where otherwise noted, the content by Piotr Kubowicz is licensed under a Creative Commons Attribution 4.0 International License.