• 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. print quote mark in the string( apologize if it has been...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 15518
  • 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

print quote mark in the string( apologize if it has been posted too many times)

imagesensor123
imagesensor123 over 13 years ago

Hi all,

   i would like to use the command in shell:

  grep "Vout" capinfo.txt > cap.out

so the problem is how to generate this for ipcProcess, some others posted this in this forum, but i hasn't been well solved.

so let's make it clearly.

i have tried strcat("grep" "\"" " Vout" "\"" "capinfo.txt>cap.out" ) =>"grep \"Vout\" capinfo.txt>cap.out",

owing to these two backslash , the script can not be exacuted in shell. 

could you help me? 

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Your command has spaces in the wrong places. If I do:

     command=strcat("grep " "\"" "Vout" "\"" " capinfo.txt>cap.out" )

    then command returns this:

     "grep \"Vout\" capinfo.txt>cap.out"

    Note that the backslashes are not really there - this is just the print representation. For example, if I do:

    printf("THE COMMAND IS [%s]\n" command)

    then it outputs:

     THE COMMAND IS [grep "Vout" capinfo.txt>cap.out]

    and I can happily do:

    sh(command)

    and it works perfectly. If the backslashes bother you, you could always do:

      command=strcat("grep " "'" "Vout" "'" " capinfo.txt>cap.out" )

    i.e. use single quotes, to get:

     "grep 'Vout' capinfo.txt>cap.out"

    Andrew

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ANSYS
    ANSYS over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    I have a similar request and I used the "\"" approach but it still doesn't work for the arguments. In my case I'm trying to open a csv file like below:

    csvinput="C:\\temp\\tmp space\\mydata.csv"

    path=axlGetVariable("CURRENT_OFFICE_VERSION")
    cmdOpenCSV=strcat( "\"" path "\\EXCEL.EXE" "\" \"" csvinput "\"" )
    cid = ipcBatchProcess(cmdOpenCSV "" "c:\\temp\\skill_log.txt")

    If I place mydata.csv on a folder without spaces, it works. Also, strangely enough the "\"" worked for excel's path as it also has white spaces. Could you please comment on that? 

    Thanks in advance.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to ANSYS

    This is probably not the best place to ask this question - you're using SKILL with the Allegro platform (not Custom IC) and so you'd be better off asking this in the PCB SKILL forum (the forum guidelines ask you not to post on the end of old threads anyway, especially as this one is 9 years old).

    Since I don't have the Allegro tools installed on Windows (and they're not my area of expertise), I can't really do some tests to see how this works or figure out which things you need to quote or escape. So please ask this again in the PCB SKILL forum.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to ANSYS

    This is probably not the best place to ask this question - you're using SKILL with the Allegro platform (not Custom IC) and so you'd be better off asking this in the PCB SKILL forum (the forum guidelines ask you not to post on the end of old threads anyway, especially as this one is 9 years old).

    Since I don't have the Allegro tools installed on Windows (and they're not my area of expertise), I can't really do some tests to see how this works or figure out which things you need to quote or escape. So please ask this again in the PCB SKILL forum.

    Andrew.

    • 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