Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

literal ^ in strings

 
Post new topic   Reply to topic    iraf.net Forum Index -> General IRAF
View previous topic :: View next topic  
Author Message
Jason Quinn
IRAF Guru


Joined: 07 Apr 2006
Posts: 151

PostPosted: Thu Oct 25, 2012 4:43 am    Post subject: literal ^ in strings Reply with quote

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:
match "^1" myfile


to list all lines that begin with the number 1. This however doesn't work. I can escape the caret:

Code:
match "\^1" myfile


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
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3255
Location: Tucson

PostPosted: Sun Oct 28, 2012 1:00 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> General IRAF All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.08 seconds