02-12-2008
20,
0
Join Date: Feb 2008
Last Activity: 4 April 2009, 2:28 AM EDT
Posts: 20
Thanks Given: 0
Thanked 0 Times in 0 Posts
I'm trying to make a list of numbers in one file, point to the respective lines in another file, and make no line repeat itself.
So File1 has numbers 1 to 5
File2 has some text, 5 lines of it.
The first line in File1 is lets say "5"
so I want to take that number, and tell unix, okay, now print out line 5 in File2.
I wanted to replace the original file because I wasn't sure how to make it traverse the list without repeating itself
And I tried using sed, because it's the only command I know which can directly print out a line of a file, no questions asked.