A modern Unix shell implementation in Fortran 2018 with advanced features
v3.3.0Modern compiler design with lexer, parser, and AST evaluator for improved accuracy
Complete implementation of shell builtins including which, type, and directory commands
Loops, functions, local variables, advanced testing [[ ]], and complete POSIX compliance
Proper signal handling for external commands with execvp model for path execution
Glob patterns, brace expansion, and comprehensive pathname expansion
Optimized release builds, memory management, and efficient execution
# Basic shell usage
fortsh
# Performance monitoring
export FORTSH_PERF=1
fortsh
# Advanced scripting
for file in *.txt; do
echo "Processing: $file"
done
# Job control
command & # Run in background
jobs # List jobs
fg %1 # Bring to foreground
# Pattern matching
echo *.{txt,log} # Glob expansion
echo test-[0-9]* # Character classes
# Enable performance monitoring
perf on
# View memory usage
memory
# Built-in commands provide runtime stats
# - Parse time: ~0.009ms average
# - Execution time: ~0.115ms average
# - Memory pools for optimization
# - Automatic memory optimization
MIT License - Free and open source