FDD-book/content
Edson Brandi 712daf6c49 Fix subshell variable scope issue in file counting scripts
The count variable was not being updated because the while loops were
running in subshells created by the pipe operator. Variable assignments
in subshells don't affect the parent shell, causing count to remain 0.

Changes:
- list_files.sh: Changed from pipe to here-document with command
  substitution to keep the while loop in the main shell
- list_files_bash.sh: Changed from pipe to process substitution using
  < <(...) syntax to avoid subshell creation for the while loop

Both scripts now correctly display the total number of files found.
2025-11-07 21:53:51 +00:00
..
appendices feat: Initial upload of FreeBSD Device Drivers Book structure 2025-08-04 09:14:49 -03:00
chapters Fix subshell variable scope issue in file counting scripts 2025-11-07 21:53:51 +00:00
images Adding images for chapter 2 2025-08-24 00:04:11 +01:00