	character*60 f1,ch*8640,label*47,c6*6,object
        call system('ls *.fits > /tmp/1.dis')
	open(1,file='/tmp/1.dis',status='old')	
	open(3,file='/tmp/dirss.tmp',status='unknown')	
        ijk=iargc()
        
	if(ijk.ne.1)write(*,2)
2	format(5x,'  Filename     Obs_date_time (UT)  Exp.  object'/60('-'))
	i=0
10	i=i+1
	read(1,'(a)',end=100)f1
	open(2,file=f1,status='old',access='direct',recl=8640)
	read(2,rec=1)ch
        f1(16:16)='  '
	k=index(ch,'DATE-OBS')+11
	m=index(ch,'TIME-OBS')+10
        j=index(ch,'EXPTIME')+23
        l=index(ch,'OBJECT')+9
        ch(m:m)=' '
        ch(l:l+1)='  '
	label=f1(1:16)//ch(k+2:k+9)//ch(m:m+8)//ch(j:j+4)//ch(l:l+8)
        j=index(ch,'RA-OBS')+11
        k=index(ch,'A87')+46
	if(ijk.ne.1)write(*,1)i,label,ch(j:j+11),ch(j+80:j+91)
	write(3,1)i,label,ch(j:j+11),ch(j+80:j+91)
1	format(i3,': ',6a)
	goto 10
100	close (1)
	call unlink('/tmp/1.dis')
        call unlink('/tmp/dirss.tmp')
        close(3)
	end
