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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: learningawk
  • Order by date
  1. learningawk

    Skipping duplicate fields before printing

    I have a coordinate file that contains vector points that draw closed polygons. The first and last data point have the same coordinate location. I am reformatting the file to be used for input into another application. Here's a test data set with the first record a column counter...
  2. learningawk

    How do I ring the terminal bell?

    Thanks PHV. It worked like I wanted it to.
  3. learningawk

    How do I ring the terminal bell?

    Thanks for the help. Both of these suggestions work except when re-directing the output to a file. Then, there is no sound. Comments? Thanks again.
  4. learningawk

    How do I ring the terminal bell?

    I want to insert a bell tone into my awk script and ring after the awk script finishes. Thanks for your assistance.
  5. learningawk

    format problem

    I have a data file as: H1 H2 H3 H4 0 0 0 0 1980 480 607006 3030970 0 100 1495 200 1495 300 1495 400 1495 500 1495 600...
  6. learningawk

    Remove whitespace from filenames

    Vlad, Thanks for help. I tried this with the following: { if (FNR==1) { if (NR>1) close(fn) gsub(/([,]+|[ ]+)/, "_"); gsub(/"/, ""); print; } } and ran it like gawk -f script *.dat I got an output of bbb aaaaaaaa It did not substitute the space...
  7. learningawk

    Remove whitespace from filenames

    Hi, I have done a search on previous submissions and found some help on this but my example doesn't quite work. I want to replace from all filenames in a directory all commas and 1 or more whitespace with a single underscore. If the file name has a " in it, i want to just remove it...
  8. learningawk

    Replacing data from one file into another

    Thanks for the help CaKiwi, works great
  9. learningawk

    Replacing data from one file into another

    I have found some similar posts but not quite like my problem. I have a data file 1 that looks like: 00001 0 000 xxxxx yyyy ...numerous records of data 00020 0 000 xxxxx yyyy ...numerous records of data 00033 0 000 xxxxx yyyy ...numerous records of data then I have a file 2 that looks like...
  10. learningawk

    polygon outline

    Here is a sample display of various vector lines that have end points (1 or 2 ) as they would be mapped in an xy reference. For ease of displaying these first/last points the y is constant for each first/last point on each vector line. Only the x is different. ------------- --------------...
  11. learningawk

    polygon outline

    I have a series of random placed xy coordinates in a file that reflect 2 points for opposite ends of a vector line. The input data files looks similar to this: 1842 1841.5 1 aaa 2338.5 1841.5 2 aaa 1891.5 1922.5 1 ccc 2394.5 1928.5 2 ccc 1798.5...
  12. learningawk

    Read a file and print a few records

    I have a file1: aaa aaaa aa aaaa a bbb bbbb bb bbbb b ccc cccc cc cccc c ddd dddd dd dddd d eee eeee ee eeee e fff ffff ff ffff f ggg gggg gg gggg g hhh hhhh hh hhhh h I have a file2: 999.00000 999.00000 999.00000 2 999.00000 999.00000 999.00000 4 999.00000...
  13. learningawk

    grep from file and rename

    CaKiwi, Thanks very much. It works perfectly. This is a great help. I can adapt this to other uses also.
  14. learningawk

    grep from file and rename

    Could anyone give me a hint on how to use AWK to do the following? I have a series of files that I want to grep out comment cards that begin with # and then write the output file name with a concatenated extension. Example: grep -v "#" input_file_name.dat >...
  15. learningawk

    Regular Expression help

    Yea, The statment : if ($0 ~ /^1[0-9]+-.*N/) {print} is performing what I need it to do. Thanks
  16. learningawk

    Regular Expression help

    Thanks, I really need a one liner to do the match statement, since I have a script that would include several hundred of these similar match and print statements. Just to clariy: I have a file that has similar but unique character strings such as: 123-2N 123-2N1 123-2N11 123-2Nb 223-2N on...
  17. learningawk

    Regular Expression help

    Thanks for the response. Can you also hint on how I would search for the field= 123-2N11 and not the others or all of the records that would contain an start with 1 and have a "N" somewhere following. Thanks
  18. learningawk

    Regular Expression help

    I am having trouble understanding how regular expressions work using AWK. I am trying to match certain characters in a substr field. For example: field 1=123-2N if (match ($1,/^[1][0-9][0-9].?[N])) { print} In my input file I have several different combinations of like data, such as: field...
  19. learningawk

    Multiple line record problem

    Thanks CaKiwi for the help on this problem.
  20. learningawk

    Multiple line record problem

    I am trying to break down an address file that consists of 3 address's per group and then this group of 3 are separated by 2 blank lines or newline character. I want to print each separate address of 4 lines in a tab or comma delimited output ( one complete address per record) Here's a dummy...

Part and Inventory Search

Back
Top