Opening file from text wrangler to terminal

command line

I'm sure this is a very basic question, but I'm just beginning to learn programming and I've gotten to a lesson where I have to create a file in text wrangler, save it to the desktop (called test.txt) and then copy it into the terminal. I then have to use the "less" command to view the file. How do I get that file from my desktop into the command line? and I'm using a mac fyi..

Best Answer

Open up Terminal.

Your Desktop is at ~/Desktop (the ~ is a shortcut for your home folder) so cd ~/Desktopreturn to go there then less test.txtreturn

By the way, if you are going to use TextWrangler and Terminal you might want to visit http://www.barebones.com/support/textwrangler/ and download the TextWrangler command line tools which allow you to open a file in TextWrangler from the command line, among other things.