Linux Bash Shell(Script)

Basic Concepts

  1. Pipe
    Represented by symbol: "|", pipe directs the stdout of the last command to the stdin of the next command.
    Example (directs the result of find command to grep command):
    find ./src/* | grep .java

  2. Environmental Variable
    export ABC=$(find ./src/* | grep .java)

Arguments in Bash Commands

Arguments in bash commands are all considered as string value. However, double quotations is optional and often omitted. Essentially, bash variables are character strings but arithmetic operations is allowed through "let" tool.


stat -x abc.txt