a=readfits('*BDD*',h) sxdelpar, h, 'COMMENT' sxdelpar, h, 'HISTORY' nLine = n_elements(h) for k=0, nLine-1 do begin split = strSplit( h[k], '=', /Extract ) key = strtrim(split[0],2) start: val = sxpar( h, key, comment=com, count=nbM, iFound=iFound ) ; if nbM gt 1 then begin ; sxdelpar, h, key ; goto, start ; endif split = strSplit( com, "'",/Extract, count=nbField ) if nbField gt 1 then begin com = '' for kF=0, nbField-1 do com+=split[kF]+' ' endif print, k, ' ',key, ' ', nbField help, val, key, com print, '' sxaddpar, h, key, val, com endfor writefits,'test.fits', a,h end