everything from a while loop into a file bash code example Example: linux while loop while true; do #code ;done