3 ms·
Pipes, redirection, scripts, etc are some of the most important reasons why command-line is better in many ways than GUI. In some cases GUI is helpful, but ofte
by zzo38computer 4y ago
Pipes, redirection, scripts, etc are some of the most important reasons why command-line is better in many ways than GUI. In some cases GUI is helpful, but often, command-line is much better in many ways.
For this and other reasons, I will often write programs as command-line using standard I/O for most data. For example, a music playing program which reads the music file from stdin and writes the audio data to stdout which is taken by aplay to play the audio on the speaker. (In this way, you can also add other thing in between such as special effects, if desired.)
(It is also useful for other programs (interactive or GUI or whatever) to have the opportunity to open pipes with other user-specified programs; Meirloom-mailx is one interactive command-line program does it (I often use that feature to display pictures attached to messages), and Free Hero Mesh (which has GUI) also exclusively uses such pipes to import/export levels and pictures and move lists.)