system_cmd(3f) - [M_system:SYSTEM_COMMAND] call execute_command_line(3f) (LICENSE:PD)
Synopsis
Description
Options
Return Value
Examples
function system_cmd(command)
character(len=*),intent(in) :: command logical :: system_cmd
Is a function that calls execute_command_line(3f). system_cmd(3f) executes a string as a system command after trimming the string.
command string specifying system command to execute
Upon successful completion .TRUE. is returned. Otherwise, [char46]FALSE. is returned. If an error occurs an error message is written to stdout.
Sample program
program demo_system_cmd use M_system, only : system_cmd implicit none logical,allocatable :: status(:) status=system_cmd([character(len=1024) :: date,pwd,logname]) write(*,*)status=,status end program demo_system_cmd
Nemo Release 3.1 | system_cmd (3m_system) | March 07, 2025 |