minishell/close.sh
2024-09-18 14:46:19 +02:00

6 lines
112 B
Bash

for fd in $(/usr/bin/env ls /proc/$$/fd); do
if [ "$fd" -gt 10 ]; then
#echo "$fd"
exec {fd}>&-
fi;
done