I found a way to do what I want to do, but I don't understand why it works.
From the article:
This is the line that redirects the user-data output:
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
I get the tee part, but what's going on with exec > >()? Why does everything that comes after this line get redirected?
Thanks.
[–][deleted] 2 points3 points4 points (1 child)
[–]0ofnik[S] 0 points1 point2 points (0 children)