sh_command Subroutine

public subroutine sh_command()

Arguments

None

Contents

Source Code


Variables

Type Visibility Attributes Name Initial
integer, public :: istat
character(len=GG_LINELEN), public :: line

Source Code

subroutine sh_command()

! ident_23="@(#) M_matrix sh_command(3f) start system shell interactively"

character(len=GG_LINELEN) :: line
integer                   :: istat

   call get_environment_variable('SHELL',line)               ! get command to execute
   IF (G_CHRA .eq. GG_EOL )then                               ! if next character on stack is end-of-line call interactive shell
      call execute_command_line(line,cmdstat=istat)          ! call shell interactively
   else                                                      ! there were characters after SH on the line
      call execute_command_line(line,cmdstat=istat)          ! call shell interactively
   endif

end subroutine sh_command