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 bkrike 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: SotonStu
  • Content: Threads
  • Order by date
  1. SotonStu

    awk matching - newbie problem

    Hi all, I have a file containing a list of words, one word per line, eg: france germany usa england I want to count the occurrences of each of these words in another file. At the moment though I can't even get the awk script to find any of the words, let alone their count. This is my shell...
  2. SotonStu

    index an array using a hexadecimal

    Hi, I need to set up an array where the indices are hexadecimal numbers. Is there any way i can do this without converting the hexadecimal numbers into decimal first? thanks for any help
  3. SotonStu

    char --> short

    How do i convert a char to a short?
  4. SotonStu

    "undefined reference to main"

    I'm trying to compile a .cpp file but i keep on getting a compiler error that reads: J:\quincy2000\mingw32\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\..\i386-mingw32msvc\lib\libmingw32.a(main.o)(.text+0x8e): undefined reference to `WinMain@16' i'm using a windows compiler called...
  5. SotonStu

    functions

    if i have two objects,in this case cards, each storing a short value that can be accessed by a getvalue() method and i want to apply an int beat(cards c) function to them to see which has a higher value, how do i access the card i want to compare the parameter against. eg: cards c1 = deck[15]...
  6. SotonStu

    Enumerations

    I have to deal with an enumeration of card suits, decared as follows: enum suits {spades, clubs, hearts, diamonds}; to create a new card i have to set a private short: value(its value, between 1 and 13) and a private suits: suit. My program will read in a list of 52 cars in the format: 9 H 1 S...
  7. SotonStu

    Find command

    How do i find all files of type *.html or *.htm in my directory, i have: find . -type f -name '*.html' for all html files, but i dont know how to include htm as well
  8. SotonStu

    Passing files to a script

    What command line do i need to pass a program all files of a certain type one by one. for example, i need to write a shell script which passes all *.html documents into an awk script. i think it may involve the find comand but i haven't managed to get anything worthwhile working. Any help...
  9. SotonStu

    Executing a script

    How can i actually run a shell script that i have made?
  10. SotonStu

    detecting substrings within strings

    This is an awk script i have written, attempting to isolate all links in an html page and print out the frequency of each link: #!/bin/gawk -f # Print list of word frequencies BEGIN{FS="\""} NR == 1 { printf("%s\n%s", (NR==1) ? "" : ")", FILENAME)}...
  11. SotonStu

    setting FS to "

    How do i set the field separator to " at the beginning of my awk script. Obviously FS=""" will not work but there must be some way to do it. many thanks.
  12. SotonStu

    Counting links in html page

    I'd like to create an awk script which can count the number of individual links in an html source page and print out the link along with the number of times it appears in the page. However, i really have no idea how to go about this, should i change the field separator? Thanks for any help!

Part and Inventory Search

Back
Top