Difference between revisions of "Ret"

From wikieduonline
Jump to navigation Jump to search
(Created page with "{{lc}} # capture the output of a command so it can be retrieved with ret cap () { tee /tmp/capture.out; } # return the output of the most recent command that was capt...")
 
 
Line 2: Line 2:
  
 
  # capture the output of a command so it can be retrieved with ret
 
  # capture the output of a command so it can be retrieved with ret
  [[cap]] () { tee /tmp/capture.out; }
+
  [[cap]] () { [[tee]] /tmp/capture.out; }
  
 
  # return the output of the most recent command that was captured by cap
 
  # return the output of the most recent command that was captured by cap
  [[ret]] () { cat /tmp/capture.out; }
+
  [[ret]] () { [[cat]] /tmp/capture.out; }
  
  
  
 
{{Bash}}
 
{{Bash}}

Latest revision as of 10:06, 19 January 2023

# capture the output of a command so it can be retrieved with ret
cap () { tee /tmp/capture.out; }
# return the output of the most recent command that was captured by cap
ret () { cat /tmp/capture.out; }


Bash [ -c ], alias, &&, Bash history, Autocompletion, set, unset, export, .bash_aliases, .bashrc and .bash profile, PS1, echo, brace expansion, Function, shopt, trap, set -e, source, PATH, complete, disown, .hushlogin, .bashrc, builtin, eval, set, $PATH, $HOME, TZ, .profile, -e, -i, Builtin (Bash), mapfile, ~, return (Bash), for, until, declare, dirname, basename, functions.sh, Bash arithmetic expansion, shift, bash --rcfile, readonly, $1, $@

Advertising: