Scripting for the shell - VxWorks

This is a discussion on Scripting for the shell - VxWorks ; Hello, Apparently scripts can be executed from the shell using " What is teh language of these scrits? Apparently we can use all the shell commands and some C calls. I tried for loops but it didnt work. Any though ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Scripting for the shell

  1. Scripting for the shell

    Hello,

    Apparently scripts can be executed from the shell using " What is teh language of these scrits? Apparently we can use all the
    shell commands and some C calls.
    I tried for loops but it didnt work. Any though on how to do this?

    What about tcl? Apparently the shell needs to be started using the -T
    option which is not so handy. Any possibility to switch back and forth
    from c to tcl?

    Thanks!


  2. Re: Scripting for the shell

    Jeanseb wrote:

    >Hello,


    Howdy.

    >Apparently scripts can be executed from the shell using " >What is teh language of these scrits?


    The same single line 'C' interpreter that one types at the shell prompt.

    > Apparently we can use all the
    >shell commands and some C calls.


    You can use any 'C' function known to the shell's symbol table. The
    shell commands are themselves implemented as functions known to the
    symbol table. Most of them are implemented in usrLib.c located somewhere
    under ?\target\src.

    You can also call absolute addresses. If, for example, you just happen
    to know that there is a function at address 0x12345678 you can call it
    from the shell thus:

    -> 0x12345678()

    >I tried for loops but it didnt work. Any though on how to do this?


    You can use repeat() and period(), but they're not much like "for" and
    "while".

    Other 'C'-isms, such as arithmetic operatros, are available in the
    shell, too.

    >What about tcl? Apparently the shell needs to be started using the -T
    >option which is not so handy. Any possibility to switch back and forth
    >from c to tcl?


    I wasn't aware of the "-T' option, so I'm no help with that!

    >Thanks!


    Yep.

    --
    ================================================== ======================
    Michael Kesti | "And like, one and one don't make
    | two, one and one make one."
    mrkesti at comcast dot net | - The Who, Bargain

  3. Re: Scripting for the shell

    Thanks Mike!


+ Reply to Thread