this is what i've got in the sample.txt
example1, answer1
example2, answer2
example3, answer3
example4, answer4, answer4b, answer4c
example5, answer5, answer5b
example6, answer6
example7, answer7
example8, answer8, answer8b
example9, answer9
example10, answer10, answer10b
and when I run...
Cheers for that.
What if there are more than 2 variables per line.
For example:
example1, answer1
example2, answer2
example3, answer3
example4, answer4, answer4b, answer4c
example5, answer5, answer5b
example6, answer6
example7, answer7
example8, answer8, answer8b
example9, answer9
example10...
Now that I've done that..
Now I want there to be a header of information. approx 3 lines.
How would I add this to the file.. the thing I could just echo into a new file and append the results of the awk statement..
what if I wanted to convert the file to pdf.
I remember there was something...
I get the same thing :-(
okay what i've got is the code in a script and it looks like:
cat tektips.awk
{
data[NR, 1] = $1
data[NR, 2] = $2
}
END {
srand()
for (i = 0; i < 10; i++)
print random(1), random(2)
}
function random(column)
{
do {
number =...
Hi,
I was wondering if you could help as I'm sure its possible. I can remember something was possible using sed/awk a while back.
I have a list in a file such as sample_list.txt which contains the following:
Code:
example1, answer1
example2, answer2
example3, answer3
example4, answer4...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.