• 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. Very fundamental- put quotation mark(s) into a string

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 145
  • Views 6454
  • 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

Very fundamental- put quotation mark(s) into a string

jorankin
jorankin over 14 years ago

I am trying to put a quotation mark into a string so that I can use a system () command to perform sed on my netlist. My netlist was modified and all of the " " 's in my netlist were removed from my .pwl file names. Now spectre won't run. Can you tell me how to do this? It is a very fundamental thing, but for some reason, it's not clear how to do this in SKILL.

Thanks,

John

  • Cancel
Parents
  • Austin CAD Guy
    Austin CAD Guy over 14 years ago

     OK, I was getting some strange things with the echo command anyways.

     I created a file with multiple lines. I wanted to the first string found on all lines to add a quote in front of it.The pattern was is

     Here is what I typed into the CIW:

    testFile = "testFile"

    pattern = "is"

     system( sprintf( cmdLine "sed 's;%s;\"%s;' %s > %s2" pattern pattern testFile testFile ))

    This sprintf is a string format command, the first argument is a symbol to hold the formatted value, it was only put in to create a debugging variable, it could have been nil.

    The format string has an escaped double quote and  4 string format statements (%s) which are filled with the values of the 4 variables which followed.

    Once it ran, I could check the formatted string by examining the value of cmdLine.

    cmdLine
    "sed 's;is;\"is;' testFile>testFile2"

    Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Austin CAD Guy
    Austin CAD Guy over 14 years ago

     OK, I was getting some strange things with the echo command anyways.

     I created a file with multiple lines. I wanted to the first string found on all lines to add a quote in front of it.The pattern was is

     Here is what I typed into the CIW:

    testFile = "testFile"

    pattern = "is"

     system( sprintf( cmdLine "sed 's;%s;\"%s;' %s > %s2" pattern pattern testFile testFile ))

    This sprintf is a string format command, the first argument is a symbol to hold the formatted value, it was only put in to create a debugging variable, it could have been nil.

    The format string has an escaped double quote and  4 string format statements (%s) which are filled with the values of the 4 variables which followed.

    Once it ran, I could check the formatted string by examining the value of cmdLine.

    cmdLine
    "sed 's;is;\"is;' testFile>testFile2"

    Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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