View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Problem with Match in .cl script

Elden Paul Iverson wrote on Jul 10, 2007

I have been having trouble using the match command. Below is a portion of the script I am using.

hselect BYU*.fits $I,FILTER yes > "datalist1"
match U\# "datalist1" > "datalistU"

I want the script to pull out the filename and filter field from each header and delete the images taken in the U filter. Unfortunately it recognizes the U in BYU as matching the U(whitespace) that should be found in the filters field. The same problem happens in with the B portion. For some reason the \# is not recognized as whitespace like the help files said it should be.

Mike Fitzpatrick wrote on Jul 10, 2007

Not recognizing the '#' may be a bug in the system, I need to look into it further. Otherwise you can use the end-of-line metachar to do what you want, e.g. to select all lines *except* those with the U filter:

cl> match "U$" datalist1 stop+


Note the 'stop' param inverts the sense of the match.

- Mike

Last post on Jul 10, 2007