Welcome to iraf.net Thursday, May 02 2024 @ 02:18 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 literal ^ in strings
   
Jason Quinn
 10/25/2012 04:43AM (Read 1217 times)  
+++++
Active Member

Status: offline


Registered: 04/07/2006
Posts: 175
I've noticed a issue with literal carets in strings. This arose because I was trying to use the match task in a script. I wanted to do a command like[code:1:1e48f524e3]match "^1" myfile[/code:1:1e48f524e3]to list all lines that begin with the number 1. This however doesn't work. I can escape the caret:[code:1:1e48f524e3]match "\^1" myfile[/code:1:1e48f524e3]and it will work.There are several related points. The help for match doesn't suggest the escape needs to be used for the caret. And recalling the command using the up arrow keys starts stripping away escapes until the caret-number combination is interpreted as a history recall. Not sure what the intended behaviour is here.The history mechanism does act weird here though.Cheers,
Jason

 
Profile Email
 Quote
fitz
 10/25/2012 04:43AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Hi Jason, This is a CL bug that apparent'y has been around forever, the history processing should not be done on literal strings of the command. When setting the params in epar things work as expected, otherwise the escapes are needed (but not handled properly). This will be fixed for the next update.-Mike

 
Profile Email
 Quote
   
Content generated in: 0.11 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login