cat on Mac OS X never exits


I'm a bit of a UNIX noob, but I'm trying to run the cat command to make a simple text file and it works great, however cat is never exited after making the file. For instance, I type cat > ~/mytextfile.txt and hit enter, the file is created but my cursor remains on a blank line.


Answers:


You're telling cat to send nothing to a file. Use touch (as mentioned) instead.