Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

brainwave89

macrumors 6502
Original poster
Jul 7, 2006
476
8
How can I use the cat command in terminal to display the contents of a file named sunny windy day.docx?

Thanks for looking.
 
"cat" will output the file sequentially, so it would work best with plain text. ".docx" is a Word document.

(See the man page for "cat": )
Code:
man cat

Or...

Are you asking why the file isn't recognized because of spaces in the filename? ("cat" still won't work, but the following would help when using a filename with special characters in general)

You can either enter it contained in quotes:
Code:
man "sunny windy day.docx"
Or, by using the '\' character to denote a special character:
Code:
man sunny\ windy\ day.docx
 
Last edited:
How can I use the cat command in terminal to display the contents of a file named sunny windy day.docx?

Thanks for looking.


One way is:
cat "sunny windy day.docx"

But that's a word file, so your going to get lots of junk on the screen.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.