Joe,
My swag is that I'm guessing the problem is redirecting the stdin in a loop:
while read line
do
callci "run main.pub.vesoft,sec;info='$line'" >> $dt
done < delcmds
How about trying something like:
awk '{printf("run main.pub.vesoft,sec;info=\"$s\"",$0)}' delcmds >>execfile
Then execute the execfile outside the shell. (or something similar w/o redirecting stdin)
RAT
Rich Trapp <mailto:[log in to unmask]>
Consulting for Agilent Technologies, Loveland, Colorado.
Managed Business Solutions <http://www.mbsnav.com/>
200 South College Avenue
Fort Collins, Colorado 80524-2811
970.679.2221 (voice)
970.669.3071 (fax)
-----Original Message-----
From: Taylor, Joe [mailto:[log in to unmask]]
Sent: Wednesday, August 21, 2002 12:53 PM
To: [log in to unmask]
Subject: POSIX script and Security 3000
I'm trying to write a script in POSIX to delete users out of Security 3000
given a file that contains a list of session ids only and then create a file
that contains logon ids for all AMISYS accounts that user was allowed access
to.
I can run the callci from the shell for an individual user without problems,
but when I put it in a loop to execute I get the following error messages.
Any help would be appreciated. Thanks.
cat Aug21
Error: Doing Fopen of $STDINX.
The redo stack cannot be created, REDO is disabled. (CIWARN 9009)
-----Will delete E63240J ,AJ .AIHWORK
-----Will delete E63240J ,ISDEV .AIHY2K
-----Will delete E63240J ,ISDEV .ADVANTA
-----Will delete E63240J ,ISDEV .AIHWORK
-----Will delete E63240J ,ISDEV .ADVANTA (inheriting from E63240J
,ISDEV
.AIHWORK )
-----Will delete E63240J ,ISDEV .AIHY2K (inheriting from E63240J
,ISDEV
.ADVANTA )
-----Will delete E63240J ,AJ .AIHWORK (inheriting from E63240J
,ISDEV
.AIHY2K )
Error: Doing Fopen of $STDINX.
END OF PROGRAM
set -x # set tracing on
LISTUSER="LISTUSER "
DELETE="DELETE "
NOVERIFY=";NOVERIFY"
id=",@.@"
rm logon_ids
rm delcmds
for session in `cat ids`
do
echo $DELETE $session$id$NOVERIFY >> delcmds
vecmd="$LISTUSER $session$id"
callci "run main.pub.vesoft,sec;info='$vecmd'" > accounts
sed '1,12d' accounts > tmp_accts
awk '{if ($1 != "***" && $1 != "END" && $1 != "") \
print $3","$2"."$1}' tmp_accts >> logon_ids
done
dt=`date +%b%d`
while read line
do
callci "run main.pub.vesoft,sec;info='$line'" >> $dt
done < delcmds
set +x # set tracing off
cat delcmds
DELETE E63240J,@.@;NOVERIFY
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|