Follow

@hackernews@die-partei.social

A collection of pure POSIX sh alternatives to external processes.
++±++++++++++++++++++++++++++++++++++++
Table of Contents
STRINGS
Strip pattern from start of string
Strip pattern from end of string
Trim leading and trailing white-space from string
Trim all white-space from string and truncate spaces
Check if string contains a sub-string
Check if string starts with sub-string
Check if string ends with sub-string
Split a string on a delimiter
Trim quotes from a string
FILES
Parsing a key=val file.
Get the first N lines of a file
Get the number of lines in a file
Count files or directories in directory
Create an empty file
FILE PATHS
Get the directory name of a file path
Get the base-name of a file path
LOOPS
Loop over a (small) range of numbers
Loop over a variable range of numbers
Loop over the contents of a file
Loop over files and directories
VARIABLES
Name a variable based on another variable
ESCAPE SEQUENCES
Text Colors
Text Attributes
Cursor Movement
Erasing Text
PARAMETER EXPANSION
Prefix and Suffix Deletion
Length
Default Value
CONDITIONAL EXPRESSIONS
File Conditionals
Variable Conditionals
Variable Comparisons
ARITHMETIC OPERATORS
Assignment
Arithmetic
Bitwise
Logical
Miscellaneous
ARITHMETIC
Ternary Tests
Check if a number is a float
Check if a number is an integer
TRAPS
Do something on script exit
Ignore terminal interrupt (CTRL+C, SIGINT)
OBSOLETE SYNTAX
Command Substitution
INTERNAL AND ENVIRONMENT VARIABLES
Open the user's preferred text editor
Get the current working directory
Get the PID of the current shell
Get the current shell options
AFTERWORD

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.