Problem in running shell command in Cadence??

  • Thread starter Reotaro Hashemoto
  • Start date
R

Reotaro Hashemoto

Guest
Hi,

I need to call some commands from shell (using bash), i tried using
system("command"), sh("command"). The first should print the shell
output (e.g. system("date") should print the day date, and return 0),
that doesn't happen! It only returns 0 and no output is printed!!

What is the problem I do probably have?

Thanks and regards,
Ahmad
 
Oh! Thanks for the hint :)

But what if I need to save or process over the output of the system
call? Then what should I do?

Any suggestions?
Thanks and regards,
Ahmad

On Jul 1, 10:17 pm, px...@cadence.com (Pete nospam Zakel) wrote:
In article <35a72d9e-8af5-4e70-bbbb-13208298e...@m3g2000hsc.googlegroups.com> Reotaro Hashemoto <ahmad.abdulgh...@gmail.com> writes:

Hi,

I need to call some commands from shell (using bash), i tried using
system("command"), sh("command"). The first should print the shell
output (e.g. system("date") should print the day date, and return 0),
that doesn't happen! It only returns 0 and no output is printed!!

What is the problem I do probably have?

Where are you looking for the output?  It will output to the terminal window
from which you started DFII, not to the CIW.

-Pete Zakel
 (p...@seeheader.nospam)

"Now and then, an innocent man is sent to the Legislature."
 
On Jul 2, 4:48 am, Reotaro Hashemoto <ahmad.abdulgh...@gmail.com>
wrote:
Oh! Thanks for the hint :)

But what if I need to save or process over the output of the system
call? Then what should I do?

Any suggestions?
Thanks and regards,
Ahmad

On Jul 1, 10:17 pm, px...@cadence.com (Pete nospam Zakel) wrote:

In article <35a72d9e-8af5-4e70-bbbb-13208298e...@m3g2000hsc.googlegroups.com> Reotaro Hashemoto <ahmad.abdulgh...@gmail.com> writes:

Hi,

I need to call some commands from shell (using bash), i tried using
system("command"), sh("command"). The first should print the shell
output (e.g. system("date") should print the day date, and return 0),
that doesn't happen! It only returns 0 and no output is printed!!

What is the problem I do probably have?

Where are you looking for the output? It will output to the terminal window
from which you started DFII, not to the CIW.

-Pete Zakel
(p...@seeheader.nospam)

"Now and then, an innocent man is sent to the Legislature."
Look at the SKILL IPC commands, in particular, ipcBeginProcess and
ipcReadProcess.

For example:
process = ipcBeginProcess("my_command")
my_command_stdout = ipcReadProcss(process)

You can also define handlers to process the output.
 
Joel wrote, on 07/02/08 15:46:
On Jul 2, 4:48 am, Reotaro Hashemoto <ahmad.abdulgh...@gmail.com
wrote:
Oh! Thanks for the hint :)

But what if I need to save or process over the output of the system
call? Then what should I do?

Any suggestions?
Thanks and regards,
Ahmad

On Jul 1, 10:17 pm, px...@cadence.com (Pete nospam Zakel) wrote:

In article <35a72d9e-8af5-4e70-bbbb-13208298e...@m3g2000hsc.googlegroups.com> Reotaro Hashemoto <ahmad.abdulgh...@gmail.com> writes:
Hi,
I need to call some commands from shell (using bash), i tried using
system("command"), sh("command"). The first should print the shell
output (e.g. system("date") should print the day date, and return 0),
that doesn't happen! It only returns 0 and no output is printed!!
What is the problem I do probably have?
Where are you looking for the output? It will output to the terminal window
from which you started DFII, not to the CIW.
-Pete Zakel
(p...@seeheader.nospam)
"Now and then, an innocent man is sent to the Legislature."

Look at the SKILL IPC commands, in particular, ipcBeginProcess and
ipcReadProcess.

For example:
process = ipcBeginProcess("my_command")
my_command_stdout = ipcReadProcss(process)

You can also define handlers to process the output.
They've also come up a lot in comp.cad.cadence recently - so a google search of
the group should be beneficial.

Regards,

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top