Difference between revisions of "Exec"

From wikieduonline
Jump to navigation Jump to search
Line 7: Line 7:
  
 
<code>exec</code> in [[Bash]]<ref>https://askubuntu.com/questions/525767/what-does-an-exec-command-do</ref>
 
<code>exec</code> in [[Bash]]<ref>https://askubuntu.com/questions/525767/what-does-an-exec-command-do</ref>
 +
 +
 +
<pre>
 +
#!/bin/bash -
 +
 +
exec > >(tee "$HOME/somefile.log") 2>&1
 +
 +
echo "$HOME"
 +
echo hi
 +
date
 +
date +%F
 +
echo bye 1>&2
 +
</pre>
  
 
== Related commands ==
 
== Related commands ==

Revision as of 07:33, 3 November 2022

Advertising: