Subshell Overhead #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
runDiags() {
(
get_system_info
get_cpu_info
# ... many functions
) & show_progress $!
Issue: Unnecessary subshell. Functions already output to stdout. Better to redirect output once:
{
get_system_info
get_cpu_info
# ...
} 2>&1 | tee -a "$LOGFILE" &
show_progress $!