Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Bypassing varia...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 2220 of 2241
Post > Topic >>

Bypassing variable substitution

by "Rajan" <svrajan@[EMAIL PROTECTED] > Apr 11, 2008 at 10:16 PM

I have an application which interacts with the user using a command line 
program. I get files which have some information that needs to be parsed
and 
then be sent as commands to my application. The output is then processed 
again using some gawk. Now the problem is my application's command has
some 
patterns which look like shell variables, regular expressions and shell 
regular expressions. If I run this from gawk's system it passes through
the 
shell and shell tries to expand them which makes the commands appear weird

to my application.

sample text from input file

itemID,B9746
orderID,97733
itemID,A7632
itemID,B3328

the commands look like

my_command_parsing_prog list all itemID itemName qty -when $(itemID) like 
'B9746.*'
my_command_parsing_prog list top 10 orderID salesCenter supplyCenter -when

$(orderID) match '^97733.*' -sort byMatch

When I try to say system <one of above command> the *s and $s are expanded

by shell. Is there a way to run the command without passing them through
the 
shell?

Rajan




 8 Posts in Topic:
Bypassing variable substitution
"Rajan" <svr  2008-04-11 22:16:05 
Re: Bypassing variable substitution
Ed Morton <morton@[EMA  2008-04-11 21:39:59 
Re: Bypassing variable substitution
"Rajan" <svr  2008-04-11 23:12:35 
Re: Bypassing variable substitution
Ed Morton <morton@[EMA  2008-04-11 22:27:10 
Re: Bypassing variable substitution
"Rajan" <svr  2008-04-12 00:39:26 
Re: Bypassing variable substitution
pk <pk@[EMAIL PROTECTE  2008-04-12 13:04:49 
Re: Bypassing variable substitution
"Rajan" <svr  2008-04-12 08:33:37 
Re: Bypassing variable substitution
spcecdt@[EMAIL PROTECTED]  2008-04-12 13:50:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 13:40:09 CDT 2008.