Register
It is currently Sat Nov 01, 2014 1:37 am

xml_grep


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Sun Aug 15, 2010 9:50 pm   

Joined: Sun Aug 15, 2010 9:46 pm
Posts: 1
I have a simple bash script but its throwing the following error.

echo "QUERY BY ID"
read u
xml_grep -p --root="user" --cond='uid[string()="$u"]' 500.xml


error: wrong handler condition '' (Global symbol "$u" requires explicit package name at (eval 13) line 11.
); at /usr/bin/xml_grep line 196


Top
 Profile  
 PostPosted: Mon Aug 16, 2010 2:47 pm   
User avatar

Joined: Sun Jun 27, 2010 12:57 am
Posts: 192
I assume you want to use the 'u' shell variable in your xml_grep tool. In that case try replacing the single quotes with double quotes. Using single quotes around shell variables will pass them literally and not evaluated. Since you're already using double quotes inside your xml_grep tool, you'll probably have to escape those.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP