#2 New task: ShellScript

closed-fixed
None
5
2003-04-10
2002-04-22
stephan beal
No

Attached is a new task, ShellScript, which can feed
arbitrary lines of text to an arbitrary shell. It can
be used to run perl, bash, or any other app which takes
a filename as a command line parameter.

TODO: ability to pass other options, other than a
script file name, to the shell.

It is not fully tested, but prelim tests look okay.

Discussion

  • stephan beal
    stephan beal
    2002-04-22

    Logged In: YES
    user_id=32742

    it looks like mozilla didn't attach the file, so let's try
    this again...

     
  • stephan beal
    stephan beal
    2002-04-22

     
    Attachments
  • stephan beal
    stephan beal
    2002-04-22

    Logged In: YES
    user_id=32742

    oh, duh... i was forgetting to check the Upload checkbox.

     
  • stephan beal
    stephan beal
    2002-04-24

    Logged In: YES
    user_id=32742

    An updated version:
    A sample shows it best:

    <shellscript>
    echo PWD=$PWD
    echo user=$USER
    </shellscript>

    <shellscript executable="/bin/sed">
    <arg line="-e 's/FOO/BAR/g'"/>
    FOO bar bar bar FOO bar bar
    </shellscript>

    <shellscript executable="/bin/make">
    <arg value="-f"/>
    default: all
    foo = this is a makefile
    all:
    @echo foo=$(foo)
    </shellscript>

    <shellscript executable="/usr/bin/perl"><![CDATA[
    print "Hello, World!\n";
    open IN, "</etc/hosts" or die "Error opening test file!\n";
    @foo=<IN>;
    print join( "",@foo ),"\n";
    ]]></shellscript>

     
  • stephan beal
    stephan beal
    2002-04-24

    Logged In: YES
    user_id=32742

    An updated version:
    A sample shows it best:

    <shellscript>
    echo PWD=$PWD
    echo user=$USER
    </shellscript>

    <shellscript executable="/bin/sed">
    <arg line="-e 's/FOO/BAR/g'"/>
    FOO bar bar bar FOO bar bar
    </shellscript>

    <shellscript executable="/bin/make">
    <arg value="-f"/>
    default: all
    foo = this is a makefile
    all:
    @echo foo=$(foo)
    </shellscript>

    <shellscript executable="/usr/bin/perl"><![CDATA[
    print "Hello, World!\n";
    open IN, "</etc/hosts" or die "Error opening test file!\n";
    @foo=<IN>;
    print join( "",@foo ),"\n";
    ]]></shellscript>

     
  • stephan beal
    stephan beal
    2002-04-24

    updated version, now extends ExecTask

     
    Attachments
  • stephan beal
    stephan beal
    2002-04-24

    Logged In: YES
    user_id=32742

    Yet another update: this one supports optional property
    expansion in the inline script, plus has some fixed api docs.

     
  • stephan beal
    stephan beal
    2002-04-24

     
    Attachments
  • Stefan Bodewig
    Stefan Bodewig
    2002-08-06

    • assigned_to: nobody --> bodewig
     
  • Stefan Bodewig
    Stefan Bodewig
    2003-04-10

    • status: open --> open-accepted
     
  • Stefan Bodewig
    Stefan Bodewig
    2003-04-10

    • status: open-accepted --> open-fixed
     
  • Stefan Bodewig
    Stefan Bodewig
    2003-04-10

    • status: open-fixed --> closed-fixed