** Occasionally it is very useful to execute system commands * (e.g., ls, pwd, date, rm, du, mkdir ....) * within a fortran program. This example get today's date and * write it to date.out using the system command * date >date.out * You can have many call system(cmd) in a program character cmd*100 *remove the existing file, if any cmd='/bin/rm date.out' call system(cmd) * do the real thing ... cmd='date >date.out' call system(cmd) print*,'The output file is date.out' stop end