• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Execute multiple Shell commands in order

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 144
  • Views 12669
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Execute multiple Shell commands in order

vtboy51
vtboy51 over 4 years ago

My goal is to create a SKILL script to execute a list of Shell commands one after another. I've done similar things for a single command, but not multiple. Below are the steps I need to complete, any direction (or confirmation it can be done) is appreciated. 

1) Open new Shell window in the background (not the shell that Cadence was launched from)

2) setenv 12345 in new window

3) run command X

4) cd /dir/1234

5) run command Z

  • Cancel
  • henker
    henker over 4 years ago

    Easiest would be probably to build a single string with the commands separated by semicolon. That is here

    "setenv 12345; run command X; cd /dir/1234;run command Z"

    and pass this to system,sh,shell or run with ipc if you need to process the output. It is the same way as you would execute multiple commands on a single line in a terminal or a Makefile.

    If you want to dynamically talk to the shell, e.g. executing commands depending on the output of previous commands and do not want to implement that with shell syntax, you could execute a shell as command proxy with ipc and talk to it via stdin/stdout/stderr ports, or, if you do not care changing the current virtuoso environment, you can modify the environment variables/cwd of the current virtuoso process and execute the commands directly, e.g

    setShellEnvVar("VARNAME_NOT_GIVEN" "12345")
    system("run command X")
    changeWorkingDir("/dir/1234)
    system("run command Z")

    But as this has impact on your global virtuoso session, I would not recommend it, usually the first is working fine.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information