;------------------------------------------------------------
;         Ajout d'une commande dans le fichier de commande 
; -----------------------------------------------------------
; fcmd: nom du fichier de commande	string
; s:	lignes de commande		strarr
;------------------------------------------------------

PRO rh_command_ajout, fcmd, s, NOLOG = NOLOG
  
  openw,  unit, fcmd,/get_lun, /append
  printf, unit, "!QUIET=1"
  IF NOT(KEYWORD_SET(NOLOG)) THEN printf, unit, "t_elaps = systime(1)" 
  FOR i=0, N_ELEMENTS(s)-1 DO printf, unit, s(i)
  IF NOT(KEYWORD_SET(NOLOG)) THEN BEGIN
    printf, unit, $
    "print, '        '+string(systime(1)-t_elaps)+' secondes de traitement'"
    printf, unit, $
      "print, '============================================================'"
  ENDIF
  close,  unit
  free_lun, unit
  RETURN

END
  
