Name: Anonymous 2012-06-06 21:53
I am high as shit right now and had this idea for something which I don't know how to do
I am not a programmer or CS student or anything
but can someone please write be a shellscript which will echo the first word (delimited by a space) of a randomly selected line in a text file, then echo (on the same line) a word from a different text file in a sequence (so 1 the first time, then 2 the second, etc) then the second word (delimited by a space) on the same line as in the first step in the first text file
and do this for as many words are in the second text file
example:
~$cat file1.txt
a b
c d
e f
g h
i j
k l
m n
~$cat file2.txt
1 2 3 4 5 6 7 8 9 10
~$./script.sh > hurr.txt
~$cat hurr.txt
i1j m2n a3b g4h e5f e6f k7l a8b i9j g10h
thank you very much
I am not a programmer or CS student or anything
but can someone please write be a shellscript which will echo the first word (delimited by a space) of a randomly selected line in a text file, then echo (on the same line) a word from a different text file in a sequence (so 1 the first time, then 2 the second, etc) then the second word (delimited by a space) on the same line as in the first step in the first text file
and do this for as many words are in the second text file
example:
~$cat file1.txt
a b
c d
e f
g h
i j
k l
m n
~$cat file2.txt
1 2 3 4 5 6 7 8 9 10
~$./script.sh > hurr.txt
~$cat hurr.txt
i1j m2n a3b g4h e5f e6f k7l a8b i9j g10h
thank you very much