How it works...

PowerShell reads content from the file system as objects, not as text. Therefore, you perform a selection of the desired columns (or as we shall later see, properties) directly. Bash, on the other hand, outputs text, columns from which are manipulated using a delimiter.

To demonstrate that this is the case, we created a new subdirectory with a space in its name, and we performed the column selection same as before, only in this case, we did not get the complete name of the new subdirectory, because the name contained a white space, which is a delimiter in awk.

Comparing Bash and PowerShell is like comparing apples and oranges—in more ways than one. However, understanding the differences helps us leverage each of the tools to our benefit.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.168.172