ADSM-L

Re: Redirecting Scripts

2001-07-03 11:07:19
Subject: Re: Redirecting Scripts
From: Bart Colbert <Bart.Colbert AT RAYONIER DOT COM>
Date: Tue, 3 Jul 2001 10:46:12 -0400
An example shell statement redirecting.

dsmadmc -id=user -password=passwd\
 "select session_id as \"SESID\", client_name as \"NODE\", state as
\"STATE\", current_timestamp-start_time as \"DURATION\", cast(bytes_sent as
decimal(18,0)) as \"BYTESSENT\", cast(bytes_received as decimal(18,0)) as
\"BYTESRECV\" from sessions where client_name='$CLIENT'" >/PATH/FILENAME




The output can be stored in a shell variable and used more than once to
evaluate.


SELECTINFO=$(dsmadmc -id=user -password=passwd\
 "select session_id as \"SESID\", client_name as \"NODE\", state as
\"STATE\", current_timestamp-start_time as \"DURATION\", cast(bytes_sent as
decimal(18,0)) as \"BYTESSENT\", cast(bytes_received as decimal(18,0)) as
\"BYTESRECV\" from sessions where client_name='$CLIENT'" |\
 egrep -v -e "^ADSTAR|\(C\)|^Command|Server|Session|^----|^ANS" |\
 tr '\n' '@' | tr [a-z] [A-Z])
echo $SELECTINFO | tr '@' '\n'
<Prev in Thread] Current Thread [Next in Thread>
  • Re: Redirecting Scripts, Bart Colbert <=