[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] facing problem while running unix command fromsqr
There are I suppose several dozen shells and scripting languages for
Unix, all or most of which will handle this quite comfortably. In the
very worst case, I suppose you could write a Korn shell script into
/tmp, chmod it and then use call system on the shell script. In Korn
shell, something like
#!/usr/bin/ksh
for i in 3 2
do
j=`expr $i - 1`
old=bak$j
new=bak$i
for fn in `ls *.$old`
do
mv $fn ${fn%%.$old}.$new
done
done
BUT does this really need to be done through SQR? SQR is a reporting &
database interface program with a few commands thrown in for talking to
the command shell. Using it for the task you name is rather like using
Korn shell to run database commands via file-here invocations of
SQL*Plus. That is, it is doable but awkward. Can't you directly use ksh,
bash, Perl, or one of the many other shells or scripting languages?
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users