# Fortran Wiki get_command

## Description

Retrieve the entire command line that was used to invoke the program.

## Standard

Fortran 2003 and later

Subroutine

## Syntax

call get_command(command)

## Arguments

• command - Shall be of type character and of default kind.

## Return value

Stores the entire command line that was used to invoke the program in command. If command is not large enough, the command will be truncated.

## Example

program test_get_command
character(len=255) :: cmd
call get_command(cmd)
write (*,*) trim(cmd)
end program