Oops! correction: On my most-recent post, I gave the wrong ksh version in the first sentence of my message.
Instead of Also, on a Linux host that has ksh 93u+ 2012-08-01 and ... I should have written: Also, on a Linux host that has 93t+ 2010-06-21 and ... Dan ----- Original Message ----- From: "dan rickhoff" <dan.rickh...@comcast.net> To: ast-users@lists.research.att.com Sent: Tuesday, September 8, 2015 11:57:15 AM Subject: Fwd: [ast-users] After upgrading ksh, the second backlash in “${myVar/\</\>}" is no longer considered as an "escape" character. Continued ... Also, on a Linux host that has ksh 93u+ 2012-08-01 and was not upgraded, here is a cooked-up example of code that works as expected: $ x='Occurrences of the token "APOLLO_SERVER" in the "common.properties" files and other "*.properties" files for "15I" "BCOM"' $ y="${x//\"*([!\"])\"/\"A-${.sh.match[1]}-Z\"}" $ print -r "$y" Occurrences of the token "A-APOLLO_SERVER-Z" in the "A-common.properties-Z" files and other "A-*.properties-Z" files for "A-15I-Z" "A-BCOM-Z" However, on the Linux host that was upgraded to 93u+ 2012-08-01, the result of my first execution of the above code is: Occurrences of the token "A--Z" in the "A--Z" files and other "A--Z" files for "A--Z" "A--Z" If I run the code a second time, I get a slightly different, but still incorrect result: Occurrences of the token "A-APOLLO_SERVER-Z" in the "A-APOLLO_SERVER-Z" files and other "A-APOLLO_SERVER-Z" files for "A-APOLLO_SERVER-Z" "A-APOLLO_SERVER-Z" Please help. Thanks, Dan ----- Original Message ----- From: "Dan Rickhoff" <dan.rickh...@comcast.net> To: ast-users@lists.research.att.com Sent: Sunday, September 6, 2015 8:49:56 AM Subject: [ast-users] After upgrading ksh, the second backlash in “${myVar/\</\>}" is no longer considered as an "escape" character. AST Users, After upgrading ksh, the second backlash in “${myVar/\</\>}" is no longer considered as an "escape" character. At my request, our Sys Admin upgraded ksh on one of our Linux servers. In the code example below, I escaped the "<“ and “>” characters, as I have in other code that has worked for years. Now, the output of the example statement includes an unexpected “\” character. Is the new behavior wrong? Or have I always been doing the wrong thing by escaping (in this example) the “>” character? If escaping special characters in the “change-to” part was incorrect, why has my other code that escapes special characters in the “change-to” part never before printed out those “\” characters? #================================ #-- Red Hat Enterprise Linux Server release 6.4 (Santiago) #-- ksh version sh (AT&T Research) 93u+ 2012-08-01 #— "rpm -qa" reports: ksh-20120801-21.el6_6.2.x86_64 #-- #— UPGRADED FROM: #— ksh version sh (AT&T Research) 93t+ 2010-06-21 #— "rpm -qa" reports: ksh-20100621-19.el6_4.4.x86_64 #— $ myVar=“x<y" $ print “${myVar/\</\>}" x\>y #— #— Previously, the printed value would have been: x>y #================================ Thanks, Dan Rickhoff _______________________________________________ ast-users mailing list ast-users@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-users
_______________________________________________ ast-users mailing list ast-users@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-users