#!/bin/sh
export PS4='$0.$LINENO+ '
exec > /tmp/TTpull.log
exec 2>&1
set -x
This is how I like to capture - now what those above means?
The PS4 i already explained in my previous post. The $0 variable holds the name of the script. $LINENO displays the current line no. within the script. The exec command redirects I/O streams. to a file /tmp/TTpull.log. 2>&1 redirects stderr and stdout. and finally - 'set -x' enables debugging.
Cheers!
DK
Subscribe to:
Post Comments (Atom)
🔭 First Impression: Exploring Grafana Mimir ... After Years with Thanos! Not an observability( OE ) purist, but I do appreci...
-
Being in Operations its quite common to face piled up backlog on a regular basis, but at the same time to mitigate the same is even more fun...
-
I have been having a great company with some of the very talented NCG’s ( New College Hires/ Grads ) last ~2yrs. I work for Intuit ...
-
This is NOT a post about how to 'Tie a Tie'. Rather , just an effort to remember a few fundamentals before we strike a convers...
No comments:
Post a Comment