GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Unix Question.... (https://gfy.com/showthread.php?t=512848)

daddy321 09-05-2005 05:55 PM

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

Big E 09-05-2005 06:04 PM

tail -2314 [file] | head -n 1

prodiac 09-05-2005 06:09 PM

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

daddy321 09-05-2005 06:25 PM

Guys. thank you so much. you saved me a lot. BOTH WORKS FOR ME!!


All times are GMT -7. The time now is 09:11 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123