![]() IFS is mostly used when one reads a file by backslash escape omission. IFS is nothing but an internal field separator which is used with while loop to split the words and line based on its value. Also one needs to make sure that an empty line is present in the end of the file. Both these loops are used keeping in mind the usability, and comfortableness of a developer to use any of the loops. ![]() The initialization is outside the while loop and that is the point of difference between for loop and read while loop. The main charismatic property is the ability to read line by line when you use the keyword read. In the while loop, if we have to read a file, we would need to use a keyword read and hence this while is known as read while loop. In the for loop, the initialization, condition check all happens in the syntax of the for loop itself. The concepts of loop are to implement these repetitive task through code and create powerful constructs through codes without any human intervention. ![]() There are eventually 2 loops through which it is possible to read a file. Here we will see what kind of loops can be used for reading a file.
0 Comments
Leave a Reply. |