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...
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
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?
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.
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...
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]...
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...
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
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?
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?
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.