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 strongm 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: *

  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

    i'm taking the value in through the argument, so that argv[1] is "8 C" (i'm playing around with a cards simulation). I'm putting argv[1] into a string then trying to say, short test = mystring[0]; how can i get the real value, rather than the ascii-character value?
  4. SotonStu

    char --> short

    that doesn't seem to work, for instance, if i say: char test = '9'; short w; w = test; cout << w; the output is: 57 obviously this is an error and all other shorts i try to convert in this way come up erroneously.
  5. SotonStu

    char --&gt; short

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

    &quot;undefined reference to main&quot;

    I'm still not sure what you mean, the compiler appears to work fine, i've tried it on several different compilers and the same error occurs
  7. SotonStu

    &quot;undefined reference to main&quot;

    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...
  8. 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]...
  9. 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...
  10. SotonStu

    Passing files to a script

    How can i modify that lines so it not only finds all html files, but also all those ending *.htm?
  11. 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
  12. SotonStu

    Passing files to a script

    So if i have this in a shell script named script. what will the line look like so that instead of the /start/searching/here it takes in an argument? how do i use argv[] here?
  13. SotonStu

    Passing files to a script

    Is it possible to have the find inside of a shell script, whereby the directory u wish to start your search in (and then progress through the whole hierarchy) is given as an argument to your shell script?
  14. SotonStu

    Passing files to a script

    Are you my UNIX guardian angel? So can i in my script just have find . -type f -name '*.html' | awk -f myawk? btw vlad, with your multiple input awk script, it doesn't manage to print out the correct filename, because when it goes into the print loop outside of the END statement, the FILENAME...
  15. 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...
  16. SotonStu

    Counting links in html page

    I've been trying out your solution Ygor but i can't get the format you're using to work. it keeps saying that ' is an invalid character when i try to run your script. how do i get this form of awk script to work?
  17. SotonStu

    Executing a script

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

    Counting links in html page

    Cheers Ygor. the more solutions that i can see, the more chance i have of actually learning something, especially the little things that i see on websites but have no idea of what they actually achieve in a script
  19. SotonStu

    Counting links in html page

    Not sure if you are still reading this thread baraka, but i was just trying out your find commands and i couldnt get it working, it kept on telling me that &quot;paths must preced expression&quot; when i entered it on the command line. If i had 10 html files in my current directory, how could i...
  20. SotonStu

    Counting links in html page

    Ok, i'm still going here but haven't made much progress. What i'm trying to do is have different associative arrays for each kind of link, so if the link has .html in it, it will be stored in web_array, if it has .jpg in it, it will be stored in pic_array and the rest just get stored in...

Part and Inventory Search

Back
Top