Home > Community > Forums > Custom IC SKILL > print SKILL(batch mode) output in unix terminal

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 print SKILL(batch mode) output in unix terminal 

Last post Tue, Oct 9 2012 12:26 PM by KKANDOTH. 4 replies.
Started by KKANDOTH 09 Oct 2012 07:19 AM. Topic has 4 replies and 1121 views
Page 1 of 1 (5 items)
Sort Posts:
  • Tue, Oct 9 2012 7:19 AM

    • KKANDOTH
    • Not Ranked
    • Joined on Thu, May 5 2011
    • Posts 8
    • Points 130
    print SKILL(batch mode) output in unix terminal Reply

    Hi All,

     I am running a skill script in batch mode and need to print the out put in unix terminal. for example

    procedure(TRY()

    a=0

    b=1

    c=a+b

    );procedure

    here I need to print the value of c on terminal like VALUE=1 . I am trying with csh(print) command but its not working. Is this possible or I am trying something which is not possible ??

    Thank You,

    Kandoth

    • Post Points: 20
  • Tue, Oct 9 2012 10:32 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: print SKILL(batch mode) output in unix terminal Reply

    One simple way is to create a string with the sprintf command and then pass the string to the system command which will run that string in the Unix terminal from which virtuoso was invoked.

    system(sprintf(nil "echo VALUE=%d" a+b))

    Note that %d will only handle integers, you'll need %f for floats.

    Derek

    • Post Points: 20
  • Tue, Oct 9 2012 11:39 AM

    • KKANDOTH
    • Not Ranked
    • Joined on Thu, May 5 2011
    • Posts 8
    • Points 130
    Re: print SKILL(batch mode) output in unix terminal Reply

     Hi Derek,

    In Case if I want to print only a text message(ex: "COMPLETED SUCCESSFULLY") then , do i need to use sprintf ?

     

    Thank You,

    Kandoth

    • Post Points: 20
  • Tue, Oct 9 2012 12:12 PM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: print SKILL(batch mode) output in unix terminal Reply

    No, you could simply do this:

    system("echo COMPLETED SUCCESSFULLY")

    Derek

    • Post Points: 20
  • Tue, Oct 9 2012 12:26 PM

    • KKANDOTH
    • Not Ranked
    • Joined on Thu, May 5 2011
    • Posts 8
    • Points 130
    Re: print SKILL(batch mode) output in unix terminal Reply

     Derek,

     

    Thank You very much for your help..

    Thank You,
    krishnan

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by KKANDOTH at 09 Oct 2012 07:19 AM. Topic has 4 replies.