running a perl script from bash script with variable arguments -


hi i'm trying write simple script takes 2 arguments , runs perl script provided input

agents=$1 group=$2 while read agent perl perlscript.pl perlconfig.conf --update_agent $agent group_name $group   done < $agents 

when run perl script on command line hand typed variables works fine. when running script error perl script update_agent command expecting 3 arguments given 4. can't seem figure out 4th variable coming from. appreciated thanks

at least,

perl perlscript.pl perlconfig.conf --update_agent $agent group_name $group 

should be

perl perlscript.pl perlconfig.conf --update_agent "$agent" group_name "$group" 

is problem? no idea. you've given little work from.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -