ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_sysShell Module Reference

This module contains procedures and generic interfaces for inferring the runtime system shell type and fetching information from the shell. More...

Data Types

interface  isFailedExec
 Generate and return failed = .false. if the attempt to run the requested shell command is successful.
Otherwise, return failed = .true. indicating the occurrence of an error. More...
 
interface  isFailedGetDirTemp
 Generate and return failed = .false. if the path to the shell-specified temporary directory is successfully returned in the output dirTemp argument.
Otherwise, return failed = .true. indicating the occurrence of an error. More...
 
interface  isFailedGetEnvVar
 Generate and return failed = .false. if the value of the input environment variable name can be successfully retrieved as a trimmed string in the output argument value.
Otherwise, return failed = .true. indicating the occurrence of an error.
More...
 
interface  isFailedGetOutput
 Generate and return failed = .false. if the output of the input system command is successfully retrieved in the allocatable argument output.
Otherwise, return failed = .true. indicating the occurrence of an error. More...
 
interface  isFailedGetShellHeight
 Generate and return failed = .false. if the attempt to fetch the height (in characters) of the current shell terminal is successful.
Otherwise, return failed = .true. indicating the occurrence of an error. More...
 
interface  isFailedGetShellShape
 Generate and return failed = .false. if the attempt to fetch the shape (height and width) of the current shell terminal is successful.
Otherwise, return failed = .true. indicating the occurrence of an error.
More...
 
interface  isFailedGetShellWidth
 Generate and return failed = .false. if the attempt to fetch the width (in characters) of the current shell terminal is successful.
Otherwise, return failed = .true. indicating the occurrence of an error. More...
 
interface  isFailedPutEnvVar
 Generate and return .true. if the attempt to (re)define the environment variable name with the specified value in the runtime shell **fails, otherwise return .false. upon success.
More...
 
interface  isShellCMD
 Generate and return .true. if the runtime system shell is Windows CMD. More...
 
interface  isShellPosix
 Generate and return .true. if the runtime system shell is POSIX-compliant regardless of the Operating System. More...
 
interface  isShellPowerShell
 Generate and return .true. if the runtime system shell is Microsoft PowerShell Core (on Unix systems) or Windows PowerShell (on Windows systems). More...
 
interface  isShellWindows
 Generate and return .true. if the runtime system shell is Windows-based (e.g., CMD, PowerShell) regardless of the Operating System. More...
 
type  shell_type
 This is the shell_type class for generating objects to determine the runtime shell type of the operating system. More...
 
type  shellis_type
 This is the shellis_type class for generating objects with logical components to determine the runtime shell type of the operating system. More...
 

Variables

character(*, SK), parameter MODULE_NAME = SK_"@pm_sysShell"
 
character(4, SK), dimension(*), parameter VARENV_DIRTEMP_WINDOWS = [character(4, SK) :: "TEMP", "TMP"]
 The constant vector of scalars of type character of default kind SK, containing the Windows shell environmental variable names that potentially the path to the system directory within which temporary files can be stored. More...
 
character(7, SK), dimension(*), parameter VARENV_DIRTEMP_UNIX = [character(7, SK) :: "TMPDIR", "TMP", "TEMP", "TEMPDIR"]
 The constant vector of scalars of type character of default kind SK, containing the Unix shell environmental variable names that potentially the path to the system directory within which temporary files can be stored. More...
 

Detailed Description

This module contains procedures and generic interfaces for inferring the runtime system shell type and fetching information from the shell.

See also
pm_os
pm_io
pm_sysInfo
pm_sysPath
pm_sysShell
Test:
test_pm_sysShell


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, Friday 3:09 AM, Dec 8, 2017, Dell Medical School, Austin, TX

Variable Documentation

◆ MODULE_NAME

character(*, SK), parameter pm_sysShell::MODULE_NAME = SK_"@pm_sysShell"

Definition at line 44 of file pm_sysShell.F90.

◆ VARENV_DIRTEMP_UNIX

character(7, SK), dimension(*), parameter pm_sysShell::VARENV_DIRTEMP_UNIX = [character(7, SK) :: "TMPDIR", "TMP", "TEMP", "TEMPDIR"]

The constant vector of scalars of type character of default kind SK, containing the Unix shell environmental variable names that potentially the path to the system directory within which temporary files can be stored.

Developer Remark:
The specific order of the vector elements is important and signifies the popularity of the environment variable names.
See also
VARENV_DIRTEMP_UNIX
VARENV_DIRTEMP_WINDOWS
isFailedMakeDirTemp
isFailedGetDirTemp
isFailedGetEnvVar
isShellWindows
isShellPosix
isFailedExec
getPathTemp
getPathNew


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, Tuesday March 7, 2017, 3:50 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin

Definition at line 100 of file pm_sysShell.F90.

◆ VARENV_DIRTEMP_WINDOWS

character(4, SK), dimension(*), parameter pm_sysShell::VARENV_DIRTEMP_WINDOWS = [character(4, SK) :: "TEMP", "TMP"]

The constant vector of scalars of type character of default kind SK, containing the Windows shell environmental variable names that potentially the path to the system directory within which temporary files can be stored.

Developer Remark:
The specific order of the vector elements is important and signifies the popularity of the environment variable names.
See also
VARENV_DIRTEMP_UNIX
VARENV_DIRTEMP_WINDOWS
isFailedMakeDirTemp
isFailedGetDirTemp
isFailedGetEnvVar
isShellWindows
isShellPosix
isFailedExec
getPathTemp
getPathNew


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, Tuesday March 7, 2017, 3:50 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin

Definition at line 72 of file pm_sysShell.F90.