Search code examples
datastage

Datastage-What is the escape character for # in execute command activity?


What is the escape character for # in execute command activity? Well i was trying to replace one string in file with "#",but datastage treating # as job parameter and expecting the value to be assigned in datastage parameters.For that we need escape character for "#". I tried using \ and / as escape characters but none of them solved my problem. Thank You.


Solution

  • Use awk to replace the # sign, and you can use the octal character code for # in the regular expression:

    !/^\043/
    

    There is a thread in DSXchange that discusses this.

    Here is a guide on escape sequences in AWK expressions.

    A table with ascii codes, including a column for octal values.