Mac OS - přesměrování výstupu

redirect, output

brew doctor &> remove.files
for i in `cat remove.files`; do sudo rm -f $i; done
---
system_profiler &> file.txt
The & tells the shell to redirect the standard output and standard error to the file.

If you want to just output standard error, you can do this:

system_profiler 2> file.txt
The 2 lets the shell know that it needs to only redirect standard error.

zdroj

Žádné komentáře:

Okomentovat

Server Side Rendering - Next

The Benefits of Server Side Rendering Over Client Side Rendering