[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Unix command in SQR



Hi Gopal,
    Did some digging and here is what I came up with the problem is {}
are creating an issue. 

 Please see the enclosed sample program I created as a work around. 
================== Sample ==========================================
begin-program

encode <123> into $open
encode <125> into $close

let $cmd = 'find . -name "*.sqr" -exec basename ' || $open || $close ||
' \; > /tmp/tp_out'

show $cmd

call system using $cmd #s wait

end-program
=================================================================

this worked like a Charm and when I cat /tmp/tp_out file I have the 
file names of the sqr files in the current directory. 

Hope I have answered the question.
Datta. 
--- Dattatraya Shetty <datta_shetty@yahoo.com> wrote:

> Gopal,
>     Did you run this command on the Unix command line? 
> 
> I think you are also missing a '\' before the ";"  
> 
> HTH 
> Datta.
> --- "Alexander, Steve" <Steven.Alexander@sanjoseca.gov> wrote:
> 
> > I think you're missing a quote mark or two, but the immediate
> problem
> > is the
> > curly brackets { and } on the same line.  The compiler looks for
> > curly
> > brackets on the same line before anything else compiles.  It will
> try
> > to
> > substitute text regardless of quote marks.  It's looking for a
> > defined
> > constant called ' || ' (including the quotes).
> > 
> > -----Original Message-----
> > From: Borde, Gopal S [mailto:gopal-borde@uiowa.edu]
> > Sent: Wednesday, August 04, 2004 11:59 AM
> > To: sqr-users@sqrug.org
> > Subject: [sqr-users] Unix command in SQR
> > 
> > 
> > Friends,
> > 
> >  
> > 
> > I am trying to issue following UNIX command in SQR to list names of
> > all
> > *.txt files in a folder.
> > 
> > ------
> > 
> > let $com1 ='find /ora10/inbound/evoucher -name "*.txt" -exec
> basename
> > '{' || '}' ";" > /ora10/inbound/evoucher/dan.lis'
> > 
> >   
> > 
> >   call system using $com1 #s wait
> > 
> >  
> > 
> > However program erred with following message
> > 
> >  
> > 
> >  
> > 
> > Error on line 49:
> > 
> >    (SQR 4707) No value found for substitution variable: {}
> > 
> > let $com1 ='find /ora10/inbound/evoucher -name "*.txt" -exec
> basename
> > '{}' ";" > /ora10/inbound/evoucher/dan.lis'
> > 
> >  
> > 
> > Error on line 49:
> > 
> >    (SQR 4008) Unknown function or variable in expression: {}'
> > 
> > let $com1 ='find /ora10/inbound/evoucher -name "*.txt" -exec
> basename
> > '{}' ";" > /ora10/inbound/evoucher/dan.lis'
> > 
> >  
> > 
> > Any suggestion to run this command will be appreciated.
> > 
> >  
> > 
> > Thanks.
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > Gopal Borde
> > 
> > ITS Dept
> > 
> >  
> > 
> > _______________________________________________
> > sqr-users mailing list
> > sqr-users@sqrug.org
> > http://www.sqrug.org/mailman/listinfo/sqr-users
> > 
> > _______________________________________________
> > sqr-users mailing list
> > sqr-users@sqrug.org
> > http://www.sqrug.org/mailman/listinfo/sqr-users
> > 
> 
> 
> 
>               
> __________________________________
> Do you Yahoo!?
> Y! Messenger - Communicate in real time. Download now. 
> http://messenger.yahoo.com
> 
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
> 



                
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users