• 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. Multiple commands using ipcBeginProcess

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 13736
  • 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

Multiple commands using ipcBeginProcess

ajayghoshmv
ajayghoshmv over 5 years ago

Hi,

I am trying to use "sed -e 's " from SKILL code to edit unix file "FileA", to replace 3 words in the 2nd line.

How to run below multiple commands using  ipcBeginProcess, Should I use ipcWait or ipcCloseProcess ?

Using && to combine , will that work as I have to work serially on each command. ?

With below code only the first command gets executed. Please advise.

FileA="/user/tmp/text1.txt"

sprintf(Command1 "sed -e '2s/%s/%s/g' %s > %s" comment1 get(form concat("dComment" RDWn))->value FileA FileA)
cid = ipcBeginProcess(Command1)


sprintf(Command2 "sed -e '2s/%s/%s/g' %s > %s"  Time getCurrentTime() FileA FileA)
cid1 = ipcBeginProcess(Command2)


sprintf(Command3 "sed -e '2s/%s/%s/g' %s > %s"  comment2 get(form concat("Duser" RDWn))->value FileA FileA)
cid2 = ipcBeginProcess(Command3)

Thanks,

Ajay

  • Cancel
  • mbracht
    mbracht over 5 years ago

    Hi Ajay,

    One way to make your life easier would be to use perl's "edit in place" feature,- assume you want to replace 'red' against 'green' in FileA you might go like this:

    ipc = (ipcBeginProcess (strcat "perl -i -p -e 's/red/green/g' /" FileA))
    (ipcWait ipc)

    The (ipcWait) waits for the perl child process to return - so when it comes back you can be sure the file is modified.

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ajayghoshmv
    ajayghoshmv over 5 years ago in reply to mbracht

    Hi Max,

    Thank you for the input. Perl helped in my code.

    Regards

    Ajay

    • 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