Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • I tried this but the top two didn't work. It just prints out everything I have in file1. E.g. File 1 has 3244343 lines and the output file also have 3244343 lines. Moreover, the output aren't showing the disparities. Commented Sep 30, 2022 at 23:13
  • @HKJ3 what operating system are you using? Have you ever opened the file in Windows? Does the last approach work? Commented Oct 1, 2022 at 10:21
  • I am using a terminal. I am writing the command directly onto the terminal rather in a script. Commented Oct 2, 2022 at 17:22
  • @HKJ3 OK, but please answer the questions I asked: what operating system are you using? Have you ever opened the file in Windows? Does the last approach work? Commented Oct 2, 2022 at 17:22
  • Thank you for your quick response. The last approach does the same thing as the first two commands. It prints out the file 1 contents. I am using a macOS v12.2.1. I am not using windows. Commented Oct 2, 2022 at 17:25