g_speran has asked for the wisdom of the Perl Monks concerning the following question:
Unix CLI root@ave:/home/admin/scripts/#: PSQL="psql -p 5555 mcdb -c \"update ev +_cus_prof set active='f' where epid='INIT_EV_HIGH_PRIORITY';\"" root@ave:/home/admin/scripts/#: su - admin -c "$PSQL" UPDATE 1 root@save:/home/admin/scripts/#: Perl script snippit ==================== Print_Success("\nDisabling ConnectEMC & Email Home\n"); my $PSQL="psql -p 5555 mcdb -c \"update ev_cus_prof set active=\'f\' w +here epid=\'INIT_EV_HIGH_PRIORITY\';\""; print "PSQL: $PSQL \n"; system("su - admin -c \"$PSQL\""); Perl Output ====================================================================== +============================= Disabling ConnectEMC & Email Home PSQL: psql -p 5555 mcdb -c "update ev_cus_prof set active='f' where ep +id='INIT_EV_HIGH_PRIORITY';" ERROR: syntax error at end of input LINE 1: update ^ sh: : command not found
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: processing PSQL with system command
by hippo (Archbishop) on Mar 30, 2022 at 13:59 UTC | |
by g_speran (Scribe) on Mar 30, 2022 at 14:17 UTC | |
by NetWallah (Canon) on Mar 31, 2022 at 05:01 UTC | |
by hippo (Archbishop) on Mar 30, 2022 at 14:34 UTC | |
by g_speran (Scribe) on Mar 30, 2022 at 15:47 UTC | |
by Fletch (Bishop) on Mar 30, 2022 at 14:52 UTC | |
by cavac (Prior) on Mar 31, 2022 at 12:23 UTC | |
by Anonymous Monk on Mar 30, 2022 at 18:12 UTC |