c Display *.ccd fits_file head  
c 1992,8,24
	character*60 f1,ch*5760,label*47,c6*6,object

c	write(*,'(//)')
c	write(*,*)'******** display *.fit fits_file head ********'
c	write(*,*)
c	write(*,*)
	
	call system('ls *.fit* > /tmp/1.dis')
	open(1,file='/tmp/1.dis',status='old')	
	write(*,2)
2	format(5x,'  Filename     Obs_date_time (UT)  Exp. '
     *  ,' Size   A82   SkyAdu seeing  u3 rms'/80('-'))
	i=0
10	i=i+1
	read(1,'(a)',end=100)f1

	open(2,file=f1,status='old',access='direct',recl=5760)
	read(2,rec=1)ch
	k=index(ch,'NAXIS1')+26
	read(ch(k:),'(i4)')n1
	k=index(f1,'.')
	f1=f1(1:k-1)
	k=index(ch,'BZERO')+18
	j=index(ch,'OBJECT')+11
	object=ch(j:j+59)
	write(c6(1:),'(i6)')n1
	k1=index(ch,'DATE-OBS')+19
	label=f1(1:16)//' '//ch(k1+2:k1+9)//ch(k1+79:k1+87)
     *    //ch(k1+166:k1+170)//c6
        j=index(ch,'A82')+11
        k=index(ch,'SKYADU')+24
        if(f1(1:1).eq.'f'.or.f1(1:1).eq.'F')then
	write(*,1)i,label
        else
	write(*,1)i,label,ch(j:j+5),ch(k-2:k+4),ch(k+80:k+85),
     c     ch(k+263:k+268),ch(k+345:k+347)
       	endif 
1	format(i3,': ',6a)
	goto 10
100	close (1)
	call unlink('/tmp/1.dis')
	end
