Difference between revisions of "Standard input (/dev/stdin)"

From wikieduonline
Jump to navigation Jump to search
Line 6: Line 6:
  
 
* <code>[[sudo]] -S</code> or <code>[[sudo]] --stdin</code>
 
* <code>[[sudo]] -S</code> or <code>[[sudo]] --stdin</code>
 +
 +
 +
https://unix.stackexchange.com/questions/61931/redirect-all-subsequent-commands-stderr-using-exec
 +
#!/bin/bash -
 +
 +
exec > >(tee "$HOME/somefile.log") 2>&1
 +
 +
echo "$HOME"
 +
echo hi
 +
date
 +
date +%F
 +
echo bye 1>&2
  
 
== Activities ==
 
== Activities ==

Revision as of 07:34, 3 November 2022

Advertising: