Date: Wed, 21 Jul 2010 16:40:37 +0200 From: jimbob palmer <jimbobpalmer@gmail.com> To: freebsd-questions@freebsd.org Subject: Bash logging: two questions Message-ID: <AANLkTilOa7V0TQ8MlI9fIs_f-ZtP2Zwz_LuMALvMyMtD@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello, I would like to run a bash script but to log output and exit codes. Essentially I would like to run the script with bash -x, but for that output to the log to go to a file, and the normal output as from running a normal script to go to the terminal. That's my first question :) My second question is about history. Bash has a -h option to remember the location of commands as they are looked up. Is it possible for this to be recorded in the history? e.g. if I run ls, it would record /bin/ls to the bash history file. Many thanks. JB
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTilOa7V0TQ8MlI9fIs_f-ZtP2Zwz_LuMALvMyMtD>