Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by CaKiwi

  1. CaKiwi

    Help Splitting Field of Input File

    I'm a little confused about what the code you posted is trying to achieve, but the following produces your desired output from your given input /departmentNumber/{ a = $2 " " $3 j = index(a, "-") if (j) { print substr(a, 1, j-1) "," substr(a, j+1) "," a } next } {printf...
  2. CaKiwi

    MS Word Font Color

    Hmmm. Most of the documents in question have come from someone else and I have no control over what they use. But the ctrl-space will be a big help. Thanks for your assistance. CaKiwi
  3. CaKiwi

    MS Word Font Color

    Thanks macropod. Is there some way of always defaulting to standard text without having to press ctrl-space? CaKiwi
  4. CaKiwi

    MS Word Font Color

    Thanks for the replies. Track changes is working ok for me. Another question, is there a way to have any text I type keep the attributes of the current default text (font, color, bold etc) rather than pick up the attributes of adjacent text? CaKiwi
  5. CaKiwi

    MS Word Font Color

    I have a Word document which uses black characters. I want all changes I make to be in red. What is the easiest way to do this? Thanks in advance. CaKiwi
  6. CaKiwi

    Distributing a Cygwin C program

    Thanks ArkM, using the -mno-cygwin option described in the second link you gave me worked perfectly CaKiwi
  7. CaKiwi

    Distributing a Cygwin C program

    I want to create a program using cygwin gcc on one system and run it on another. One way to do this is to copy cygwin1.dll to the second system along with the program. However I understand that it is possible to link the program with Windows libraries but I can't find the syntax needed. Thanks...
  8. CaKiwi

    How to get a number from a String

    You're welcome, glad it worked for you CaKiwi
  9. CaKiwi

    How to get a number from a String

    What operating system are you using? I'm guessing windows. If so, put this code into a file test.awk /Production on/ {a= $6 " " $7 " " $8 " " $9 " " $10 ","} /FILE_ONE/ {a=a substr($NF,10)} $2==2 {b[++i]= ", " $3} END {print a b[1] b[2] b[3]} Then run by using gawk -f test.awk test.txt CaKiwi
  10. CaKiwi

    How to get a number from a String

    I copied the line for the 2nd method I gave above and pasted it into a terminal. It worked without error. What error do you get with the 1st method using test.awk? CaKiwi
  11. CaKiwi

    How to get a number from a String

    What errors or results did you get? You can put the program into a file, test.awk say, and run it with gawk -f test.awk test.txt Or you can put include the program on the command line gawk '/Production on/ {a= $6 " " $7 " " $8 " " $9 " " $10 ","}/FILE_ONE/ {a=a substr($NF,10)} $2==2 {b[++i]=...
  12. CaKiwi

    How to get a number from a String

    I meant 10.5 and 109.5, of course CaKiwi
  13. CaKiwi

    How to get a number from a String

    This may get you started. I assumed 10.7 in the file and 109.7 in the required output were supposed to be the same number /Production on/ {a= $6 " " $7 " " $8 " " $9 " " $10 ","} /FILE_ONE/ {a=a substr($NF,10)} $2==2 {b[++i]= ", " $3} END {print a b[1] b[2] b[3]} CaKiwi
  14. CaKiwi

    Vim Syntax Highlighting

    The part I was missing was to put my file type in the filetype.vim file (in /usr/share/vim/vimcurrent on my system). I found it by searching for f77 in the vim directory. It must be mentioned in the doc somewhere, but I didn't find it, although reading doc is not my forte. CaKiwi
  15. CaKiwi

    Vim Syntax Highlighting

    Thanks for the response, Annihilannic. I think the piece I'm missing is how to get vim to recognize a new file type. Fortran has a few of the same key words (if, endif, do, etc) so I copied the fortran syntax file as a pp syntax file but nothing was hightlighted. Any help greatly appreciated...

Part and Inventory Search

Back
Top