PDA


View Full Version : Any fluent Unix user here?


Jliao
02-10-2005, 03:08 PM
How do you use sed to perform like cat? and tail?
so like cat <filename> and tail -10 <filename>

Thanks!

MrCoffee
02-14-2005, 06:20 PM
The first is easy, just run `sed "" <filename>` and it'll just output every line in the file. As for doing a tail, I can't think of an easy way to do it. Think I found something on google while at the office, but right now I'm too tired(or lazy) to search for it again.

Easier answer, don't use sed for those two functions. :) Just use cat and tail, that's why they're there.

 
SprintUsers.com was created in January 2002 as a resource for users of Sprint PCS products and services to learn about and share information. We have cll phone reviews, Cellular Accessories, Downloads, PDA reviews, Ringtones, all of the latest Sprint PCS news and information, an area where you can find help in creating a ring tone or custom image for you phone, and so much more. The most popular section is the message board where visitors can read and write messages, ask questions, and get advice about their cellular phone from other users.