Skip to Main Content
InterSystems Ideas
We love hearing from our users. Tell us what you want to see next and upvote ideas from the community.
* Bugs and troubleshooting should as usual go through InterSystems support.
Status Already exists
Categories InterSystems IRIS
Created by Phillip Wu
Created on Oct 10, 2022

Linux: iris session [command line] get commands from a file

On Linux systems, the command line interface there is no command that says read commands from a file.

A sample session looks like:

iris session myinstance

Username: superuser

Password: ************

myinstance:USER>zn "%SYS"

myinstance:USER>write !,"hello"

hello

myinstance:USER>source /tmp/mycommands.iris <- new command suggestion to read commands from a file


ps. I think the functionality exists on Windows terminal application but does not exist on Linux terminal application

  • ADMIN RESPONSE
    Jan 26, 2023

    Thank you for posting the idea. According to information from experts, this functionality already exists.

  • Phillip Wu
    Reply
    |
    Feb 23, 2024

    The suggestions presented here are helpful but are "work arounds" where OS functionality is used to get around the problem.


    Let me compare IRIS DB to Oracle DB:
    with Oracle DB you start a session to a database with the

    sqlplus


    If you have commands you wish to send to the Oracle DB from a file you say:
    @filename

    iris session

    should have the same functionality

  • Phillip Wu
    Reply
    |
    Nov 27, 2022

    Yes that is possible.


    However you cannot with this feature:

    • enter user id & password

    • Is not flexible, in that you cannot start an interactive seesion say to check on something then if the check proves OK then run a set of commands from a file

  • Admin
    Vadim Aniskin
    Reply
    |
    Nov 26, 2022

    Phillip, thank you for posting the idea. According to information from Developer Community experts, this functionality already exists.

  • Dmitry Maslennikov
    Reply
    |
    Oct 27, 2022

    cat <<EOF | iris session IRIS

    Write !,"hello"

    halt

    EOF



    cat /tmp/mycommands.iris | iris session IRIS