RUVIDEO
Поделитесь видео 🙏

Shell tutorial part 15: combining pipelining and input/output redirection

Your dreams have finally come true, we can now construct super-powerful commands using all the techniques learnt so far - pipelining, and input/output redirection.
Note: although most other shells can perform advanced redirection as shown in this video, usually the syntax for them is a bit different. So, if you want to use other shells instead of tcsh - read up on their advanced redirection syntax.
-----------------------
Video content:
0:16 : Every command has two outputs - the error output (also called stderr), which is used for printing error messages, and the standard output (also called stdout), which is used for printing everything else.
0:53 : |. The "pipe" symbol tells the shell to use the output of the command that appears before the pipe as the input for the command that appears after the pipe.
1:27 : &. By writing & after | we can pipeline both stdout and stderr at the same time. This is exactly the same as using & together with right-angled-bracket or double-right-angled-bracket.
1:54 : It is possible to redirect a command's output and pipeline it, at the same time. For example, one can redirect the stdout of one command to /dev/null, which is the "trash can" of the operating system, and then pipeline the stderr to the next command.
2:56 : If one uses pipelining, it is possible to redirect every output (stderr and stdout) of every command in the whole pipeline.
4:36 : left-angled-bracket |path-to-commands-file|. This allows passing a commands file to a program that usually receives keyboard input. The command will executed every command in the file, one by one. This can be used even for commands that receive paths to files as inputs.
5:14 : It is possible to combine input and output redirection with pipelining!
5:36 : single right-angled-bracket ! |file-path|. By using ! together with a single right-angled-bracket, we can "force" the shell to perform the redirection, even if the supplied path already exists. If it does exist, the shell will overwrite it with the new output (erase the previous content and then enter the new content). If it doesn't exist, it will work exactly as using a right-angled-bracket without !.
-----------------------
Relevant links:
The complete pipleining and input/output redirection playlist: https://www.youtube.com/playlist?list=PLuHmgt1HXB7C1nGW6WbFznLrbPVqKdUoX
The complete shell tutorial playlist: https://www.youtube.com/playlist?list=PLuHmgt1HXB7AoJRbiSPzJ22uz34isVF__

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Shell tutorial part 15: combining pipelining and input/output redirection», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.