execute a shell script in a shell script - Perl

This is a discussion on execute a shell script in a shell script - Perl ; Please help. I have been stumbled on this issue, please see below. I am unable to execute a shell script in a shell script. I need to use perl script but not others and have tried eval, -exec and other ...

+ Reply to Thread
Results 1 to 3 of 3

execute a shell script in a shell script

  1. Default execute a shell script in a shell script

    Please help.
    I have been stumbled on this issue, please see below. I am unable to
    execute a shell script in a shell script.
    I need to use perl script but not others and have tried eval, -exec
    and other on perl script but failed.
    system"cleartool setview -exec \"cleartool describe -fmt 'On %Sd
    modified %En and comment:\n %c\n\n' /myproject/vob/myprogram.C\"
    my_lag ";

    tks.


  2. Default Re: execute a shell script in a shell script

    On Dec 3, 8:30 am, moongeegee <moongee...@gmail.com> wrote:
    > Please help.
    > I have been stumbled on this issue, please see below. I am unable to
    > execute a shell script in a shell script.
    > I need to use perl script but not others and have tried eval, -exec
    > and other on perl script but failed.
    > system"cleartool setview -exec \"cleartool describe -fmt 'On %Sd
    > modified %En and comment:\n %c\n\n' /myproject/vob/myprogram.C\"
    > my_lag ";
    >
    > tks.


    Must be a clearcase problem. This works fine:
    perl -e 'system "perl -e \"system \"ls\"\""'

    --S

  3. Default Re: execute a shell script in a shell script


    Quoth moongeegee <moongeegee@gmail.com>:
    > Please help.
    > I have been stumbled on this issue, please see below. I am unable to
    > execute a shell script in a shell script.
    > I need to use perl script but not others and have tried eval, -exec
    > and other on perl script but failed.
    > system"cleartool setview -exec \"cleartool describe -fmt 'On %Sd
    > modified %En and comment:\n %c\n\n' /myproject/vob/myprogram.C\"

    ^^ ^^^^
    Note that these will be translated by Perl into literal newline
    characters before the shell sees them; I don't know if this might be
    causing problems.

    > my_lag ";


    You may have better luck with system LIST and single quotes, as you've
    two fewer layers of interpolation:

    (my $ctcmd = <<'CTCMD') =~ tr/\n//d;
    cleartool describe -fmt 'On %Sd modified %En and comment:\n %c\n\n'
    /myproject/vob/myprogram.C
    CTCMD

    system
    cleartool => setview =>
    -exec => $ctcmd,
    'my_lag';

    Ben


+ Reply to Thread

Similar Threads

  1. passing arguments to a shell script from a perl script
    By Application Development in forum Perl
    Replies: 4
    Last Post: 12-10-2007, 03:55 AM
  2. IS IT POSSIBLE TO EXECUTE A SHELL SCRIPT TO TO THE FOLLOWING
    By Application Development in forum TCL
    Replies: 9
    Last Post: 09-25-2007, 02:04 PM
  3. shell script and gnuPG
    By Application Development in forum Mutt
    Replies: 2
    Last Post: 10-30-2006, 08:26 PM
  4. Replies: 6
    Last Post: 08-11-2006, 10:43 PM
  5. shell script
    By Application Development in forum ASM x86 ASM 370
    Replies: 2
    Last Post: 07-16-2006, 08:03 PM