From: moonhkt on 22 Apr 2010 08:51 On 4æ22æ¥, ä¸å7æ50å, Ed Morton <mortons...(a)gmail.com> wrote: > On 4/22/2010 12:30 AM, moonhkt wrote: > > > Hi All > > > System  :AIX 5.3 > > > I prepare procedure for Database activity to other party. I want log > > each command to a file. > > how to log commad to a file ? > > > e.g. > > ls -lt *.txt > > ps -ef|grep pro > > ps -ef|grep pro|wc -l > > rm *.txt > > man script Just test script(script â make typescript of terminal session) on cygwin. It works. Will try on AIX. For other suggestion, will try on AIX exec 2> "$HOME/log.$$" set -v ## or: set -x and history Thank a lot. FYI Just want keep the user input command at shell prompt. For running script, inside the script already keep the shell name in log file.
From: Robert Bonomi on 22 Apr 2010 19:33 In article <9cf774a9-a568-4554-87ca-d8693a2e965e(a)k33g2000prk.googlegroups.com>, moonhkt <moonhkt(a)gmail.com> wrote: >Hi All > >System :AIX 5.3 > >I prepare procedure for Database activity to other party. I want log >each command to a file. >how to log commad to a file ? 'man script' should provide what you want.
|
Pages: 1 Prev: Splitting output to stderr Next: formatted output - help needed |