O'Reilly logo

Practical UNIX by Steve Moritsugu - DTR Business Systems

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing Complex Pipelines Using Command-Line Editing

Command-line editing enables you to do much more than just correct mistakes on the command line. It allows you to reliably build up complex pipelines on the command line that would not be possible or safe any other way. Let me demonstrate this in an example from real life.

The lpstat command shows print requests that I have submitted but that are still in the queue waiting to be printed:

$ lpstat
p215-2422                stevemor           1448   Sep 09 19:39
p104-2426                stevemor             29   Sep 11 09:37
p104-2427                stevemor           5347   Sep 11 09:37
p215-2431                stevemor             29   Sep 11 09:37
p215-2432                stevemor             29   Sep 11 09:38
p215-2433                stevemor             29   Sep 11 09:38
p215-2436                stevemor             29   Sep 11 09:46
p215-2437                stevemor             29   Sep 11 09:46
...

The lpstat ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required