Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-05-2005, 05:55 PM   #1
daddy321
Registered User
 
Join Date: Jul 2005
Posts: 22
Unix Question....

Hi guys, I like to display/print a specific number from a file with unix command. how do I do that? (not in vi editor)

For example, all I know is line number...e.g.: 2314th line. File is huge like 3gig. I wanna see just one line. Which unix command(s) can show me that?

thanks
daddy321 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-05-2005, 06:04 PM   #2
Big E
Registered User
 
Industry Role:
Join Date: Mar 2002
Location: San Diego, CA
Posts: 935
tail -2314 [file] | head -n 1
Big E is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-05-2005, 06:09 PM   #3
prodiac
Confirmed User
 
Industry Role:
Join Date: Sep 2003
Location: amerinoc.com
Posts: 419
Quote:
Originally Posted by Big E
tail -2314 [file] | head -n 1
That'd pull the last 2314 lines of the file, and print the first one in that list. So I think you'd want to use that backwards, head -2314 [file] | tail -1
prodiac is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-05-2005, 06:25 PM   #4
daddy321
Registered User
 
Join Date: Jul 2005
Posts: 22
Guys. thank you so much. you saved me a lot. BOTH WORKS FOR ME!!
daddy321 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.