;------------------------------------------------------
;         Creation d'un fichier de commande
; -----------------------------------------------------
; fcmd:  nom du fichier de commande	string
; -----------------------------------------------------
PRO rh_command_creation, fcmd
  fbil = fcmd
  npos = strpos(fbil,'.cmd')
  strput,fbil,'.bil',npos
  openw,  unit, fcmd,/get_lun
  printf, unit, "#! /bin/sh"
  printf, unit, 'exec >'+fbil+' 2>&1  '
  printf, unit, 'if [ "$RH_DIR" = "" ]; then'
  printf, unit, '    RH_DIR=/usr/local/soft/soft_rh'
  printf, unit, '    export RH_DIR'
  printf, unit, 'fi'
  close,  unit
  free_lun, unit
  RETURN

END
  
