LinuxCommandLibrary

typeinc

Include file type information in file names

TLDR

Enter the typing test

$ typeinc
copy

Display the top 10 rank list for input difficulty level
$ typeinc [[-r|--ranklist]] [difficulty_level]
copy

Get random English words present in our wordlist
$ typeinc [[-w|--words]] [word_count]
copy

Calculate hypothetical Typeinc score
$ typeinc [[-s|--score]]
copy

SYNOPSIS

type [OPTION]... COMMAND_NAME...

PARAMETERS

-a
    Display all possible interpretations of COMMAND_NAME, such as both an alias and an external executable, if they exist.

-f
    Suppress shell function lookup (primarily for Bash). This causes type to treat shell functions as if they were not defined.

-p
    If COMMAND_NAME would be executed as an external command, output its full pathname. The command exits with success (0) if found, and failure (non-zero) otherwise, suppressing any other output.

-P
    Force a PATH search for COMMAND_NAME, even if it is an alias or shell function. This option is similar to -p but specifically ensures a PATH lookup.

-t
    Output a single word indicating the type of COMMAND_NAME: alias, keyword, function, builtin, or file. No other information is displayed.

DESCRIPTION

The type command is a shell built-in utility that describes how a command name would be interpreted if used as a command. It helps users understand whether a command is an alias, a shell function, a shell built-in, or an external program located in the system's PATH. This is particularly useful for debugging scripts, understanding command precedence, and ensuring the correct version of a command is being executed.

When invoked, type examines its arguments (command names) and outputs information about them. For example, it might tell you if 'ls' is an alias or a program, or if 'cd' is a built-in. This distinguishes it from commands like which or whereis which primarily locate external executables.

CAVEATS

The command 'typeinc' is not a standard Linux command or utility. It is highly probable that 'type' was intended. The information provided here pertains to the type shell built-in command.

As a shell built-in, type is part of the shell itself (e.g., Bash, Zsh, Ksh) and does not exist as a separate executable file in the file system. Its behavior can slightly vary between different shell implementations.

RETURN VALUE

The type command returns a status of 0 if all specified COMMAND_NAMEs are found and interpreted, and a non-zero status if any COMMAND_NAME is not found or cannot be interpreted as a command.

HISTORY

The type command has been a fundamental part of Unix-like shells, including the Bourne shell (sh), and later expanded upon in more modern shells like Bash, Zsh, and Ksh. It is defined in the POSIX standard as a way for users and scripts to reliably determine how a command name is interpreted by the shell, a critical aspect of command execution and shell scripting.

SEE ALSO

which(1), whereis(1), command(1), man(1)

Copied to clipboard