Reputation
Top tag
Next privilege 75 Rep.
Set bounties
Badges
2 2 6
Newest
 Commentator
Impact
~49k people reached

  • 0 posts edited
  • 0 helpful flags
  • 1 vote cast
20h
comment awk repeats lines too many times
thank you for this suggestion
20h
comment awk repeats lines too many times
thank you for that example
20h
comment substitute values in one text file into another text file
thank you - that works much better! appreciate the help!
1d
asked awk repeats lines too many times
1d
comment substitute values in one text file into another text file
text file - test.awk: printf("\n($2 == \"cs.cpool\") && (h==1) {printf(\"%%f %%s\\n\",$1=="$1",$2); a=1;}"); printf("\n($2 == \"cs.leafc\") && (h==1) {printf(\"%%f %%s\\n\",$1=="$1",$2); a=1;}"); printf("\n($2 == \"cs.dead_leafc\") && (h==1) {printf(\"%%f %%s\\n\",$1=="$1",$2); a=1; h=0;}"); file of numbers - input.txt: -0.00432739 0.41369093 0.00000000 command: awk -f test.awk < input.txt > new.txt I want first line to have first number, second line have second number, etc... but each line is assigned the first number, followed by each line assigned the second number, etc...
1d
comment substitute values in one text file into another text file
here is my text file:
1d
awarded  Commentator
1d
comment substitute values in one text file into another text file
thank you, that worked! however, in a test where i have 3 of the text lines, and feed in a text file of 3 number - it assigns each of my 3 text lines the first number, then repeats the 3 text lines giving each the second number, then repeats the 3 text lines giving each the third number. any idea how to keep it from repeating?
1d
comment substitute values in one text file into another text file
thank you, and it would be great to have fewer scripts and structure this more efficiently. i will try to construct it per your example, but this is a little more advanced than i understand - and i have yet to learn for loops!
1d
asked substitute values in one text file into another text file
Jul
26
awarded  Famous Question
Jun
1
awarded  Famous Question
May
16
awarded  Notable Question
Jan
29
awarded  Notable Question
Jan
23
awarded  Popular Question
Dec
13
awarded  Popular Question
Jul
11
awarded  Scholar
Jul
11
awarded  Supporter
Jul
11
accepted Combine multiple text files into one file
Jul
11
comment Combine multiple text files into one file
thank you Radu. that just about gets me what i want! sorry, i realize now that i am posting to the wrong place, as i see the notification about being off-topic. i thank you for you help!