Ah, I believe that would be from a college course.
Statements that start with # in C/C++ are known as preprocessor directives, that is, they are executed before compilation begins. OP has used a which will replace any instance of A (
IF(x)
) with B (while (x)
) in the code.
So the IF
statement is really just a while
statement.
I would recommend editing your fstab and use the USB drive’s UUID to mount it to a consistent location. That way, even if you reboot or disconnect the drive and the reconnect it to, say, a different USB port, it will always mount to the same mountpoint.
See this page from the arch wiki for more info.