Hi, I'm not sure an apples to apples example is possible in print. I have sudu set up as an alias (alias sudu='sudo -H -u prodaccount SudoENV.ksh where SuoENV.ksh is a bash shell script that references the prodaccount environment variables. Actual command line example; sudu optim_table.pl -i ab_in_keys_201504 -ic NZMDSODS -n 1000 -o work_cal_123 -oc NZMDSODS -u clough -w "track_seq in ('Z010201503052014871','Z0102015030520148710')" .pl snippets
result: CED WHERE CONDITION track_seq CED WHERE CLAUSE track_seq expected: CED WHERE CONDITION track_seq in ('Z010201503052014','Z010201503052014') CED WHERE CONDITION track_seq in ('Z010201503052014','Z010201503052014') This may not be a perl issue per se and more of a shell issue. I'm hoping the symptoms described will foster some thoughts/tricks on how to rectify the quirk.GetOptions ("i=s" => \$input_tbl, "ic=s" => \$input_con_str, ## defaults to +"nzmdsods" "o=s" => \$output_tbl, ## defaults to +"${input_tbl}" "oc=s" => \$output_con_str, ## defaults to +"nzmdsods" "u=s" => \$user, "k=s" => \$key, ## defaults to +"rowid" "w=s" => \$where_condition, ## defaults to +"1=1" "n=i" => \$rec_count, ## defaults to +1000 "cfg=s" => \$config_file, ## defaults to +same name as report file; if specified, overrides pii class mapping "ld=s" => \$log_dir ## defaults to +"/Projects/OPScripts/MDS/logs" ); ..... print "CED WHERE CONDITION $where_condition\n"; $where_condition = "1=1" if (!$where_condition); $where_clause = "where $where_condition"; print "CED WHERE CLAUSE $where_clause\n";
In reply to Re^2: sudo ignoring string entry after first space encountered
by perl197
in thread sudo ignoring string entry after first space encountered
by perl197
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |