bash q
Constantine Shulyupin
const at makelinux.co.il
Mon Apr 8 11:08:46 IDT 2013
For debugging bash scripts I use
set -o xtrace # long form of -x
set -o pipefail
set -o errexit
# print file, line number and function name while tracing
PS4='+ $(echo -en "\\033[1;36m`basename "$0"`:$LINENO $FUNCNAME()\033[0m ")'
On Mon, Apr 8, 2013 at 10:32 AM, Erez D <erez0001 at gmail.com> wrote:
> to debug a shell script i can run it as 'sh -x myscript'
> but how can i enable the debug from within the script if run with 'sh
> myscript' ?
>
> thanks,
> erez.
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
--
Constantine Shulyupin
http://www.MakeLinux.co.il/
Embedded Linux Systems
Tel Aviv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20130408/0a0444ff/attachment.html>
More information about the Linux-il
mailing list