![]() The m&>n and m>n.txt inform the shell on how to perform open() and dup2() syscall (see also How input redirection works, What is the difference between redirection and pipe, and What does & exactly mean in output redirection ) Shell redirections ![]() In that sense, redirections are inherited from the parent shell. Additionally, certain commands such as time and strace write output to stderr by default, and may or may not provide a method of redirection specific to that commandīasic theory behind redirection is that a process spawned by shell (assuming it is an external command and not shell built-in) is created via fork() and execve() syscalls, and before that happens another syscall dup2() performs necessary redirects before execve() happens. ![]() First thing to note is that there's couple of ways depending on your purpose and shell, therefore this requires slight understanding of multiple aspects. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |