in reply to Re: sudo ignoring string entry after first space encountered
in thread sudo ignoring string entry after first space encountered
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: sudo ignoring string entry after first space encountered ("$@")
by tye (Sage) on Apr 15, 2015 at 03:08 UTC | |
by perl197 (Novice) on Apr 15, 2015 at 17:01 UTC | |
by tye (Sage) on Apr 16, 2015 at 03:08 UTC | |
by RonW (Parson) on Apr 15, 2015 at 19:49 UTC |