Sponsored Content
Top Forums Programming Simple C program to count word lengths Post 302983678 by Riker1204 on Friday 14th of October 2016 04:29:41 PM
Old 10-14-2016
Hey Don,

I meant K&R! Sorry for the confusion.

Also, very happy to follow your instructions, which means stating I am solving a question from a book and possibly the question itself ( correct?).

None of my work is "homework", as I'm not in school nor getting graded and such. Simply learning for learning sake.

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How do I count # of char. in a word?

I havent done shell scripting in quite some time. I want to know how to count the number of characters in a word, specifically a parameter. Example: myscript hello I want "myscript" to return the number of charcaters in the parameter "hello". Any ideas? (9 Replies)
Discussion started by: xadamz23
9 Replies

2. UNIX for Dummies Questions & Answers

count word

hi, given a file i need to get the first line and secodn line and count each of the line whether the length of first line and second line is the same i don;t know how to get the length of the line...seems like use 'wc' cannot do it... please advice (1 Reply)
Discussion started by: ariuscy
1 Replies

3. Shell Programming and Scripting

specified word count

hi iam trying to do a specified word count on file called text i have a few ideas but don't get the result i want do any one have a idea please help i have this at the moment cat text echo "Please enter the word you are looking for:" read string echo "the word < $string > occurs in... (5 Replies)
Discussion started by: bhaviknp
5 Replies

4. UNIX for Dummies Questions & Answers

Word Count

Hi All, Please let me know how to get the count of a particular word in a file. Example. I am looking for count of word 'result' in a file abc.xml. Thanks, Shankar (10 Replies)
Discussion started by: s_chowhan
10 Replies

5. Fedora

word count wc

could someone explain this please. echo aaaa|wc -c 5 echo aaaa|wc -m 5 But I'd expect the count to be 4 Its SunOS 5.8 Thanks in Advance. (5 Replies)
Discussion started by: chaandana
5 Replies

6. Shell Programming and Scripting

Word count of lines ending with certain word

Hi all, I am trying to write a command that can help me count the number of lines in the /etc/passwd file ending in bash. I have read through other threads but am yet to find one indicating how to locate a specifc word at the end of a line. I know i will need to use the wc command but when i... (8 Replies)
Discussion started by: warlock129
8 Replies

7. UNIX for Advanced & Expert Users

Word count

Script that lists all words used in one or more files and displays their count (pattern /\W+/ to split the lines of the input file into words can b used).. It should display list in format word:count...gets Filename as an cmd line argument! eg: $perl test doc (where doc is d file we are going to... (4 Replies)
Discussion started by: aadi_uni
4 Replies

8. Shell Programming and Scripting

if, word count

Hi, I need to count the lines of a file stack.html and if the amount lines i want to do something. At this moment, I have if ; then ... This is not working. Any ideas? Thanks! (3 Replies)
Discussion started by: azertyazerty
3 Replies

9. Shell Programming and Scripting

Word Count error

I need to read a trigger file whose name can be: ABC!DEF@2014.txt or ABC!DEF@2014,2015.txt and then carry out functions on those inputs. Currently I am doing: YEAREXPORT { FILE= xyz.txt ls ABC* -l > ${FILE} if ; then log_err "Trigger File ABC* does not exist!" fi (4 Replies)
Discussion started by: rajiv_kool
4 Replies

10. UNIX for Beginners Questions & Answers

UNIX script to check word count of each word in file

I am trying to figure out to find word count of each word from my file sample file hi how are you hi are you ok sample out put hi 1 how 1 are 1 you 1 hi 1 are 1 you 1 ok 1 wc -l filename is not helping , i think we will have to split the lines and count and then print and also... (4 Replies)
Discussion started by: mirwasim
4 Replies
VW(1)								   User Commands							     VW(1)

NAME
vw - Vowpal Wabbit -- fast online learning tool DESCRIPTION
VW options: -h [ --help ] Look here: http://hunch.net/~vw/ and click on Tutorial. --active_learning active learning mode --active_simulation active learning simulation mode --active_mellowness arg (=8) active learning mellowness parameter c_0. Default 8 --adaptive use adaptive, individual learning rates. --exact_adaptive_norm use a more expensive exact norm for adaptive learning rates. -a [ --audit ] print weights of features -b [ --bit_precision ] arg number of bits in the feature table --bfgs use bfgs optimization -c [ --cache ] Use a cache. The default is <data>.cache --cache_file arg The location(s) of cache_file. --compressed use gzip format whenever possible. If a cache file is being created, this option creates a compressed cache file. A mixture of raw-text & compressed inputs are supported with autodetection. --conjugate_gradient use conjugate gradient based optimization --nonormalize Do not normalize online updates --l1 arg (=0) l_1 lambda --l2 arg (=0) l_2 lambda -d [ --data ] arg Example Set --daemon persistent daemon mode on port 26542 --num_children arg (=10) number of children for persistent daemon mode --pid_file arg Write pid file in persistent daemon mode --decay_learning_rate arg (=1) Set Decay factor for learning_rate between passes --input_feature_regularizer arg Per feature regularization input file -f [ --final_regressor ] arg Final regressor --readable_model arg Output human-readable final regressor --hash arg how to hash the features. Available options: strings, all --hessian_on use second derivative in line search --version Version information --ignore arg ignore namespaces beginning with character <arg> --initial_weight arg (=0) Set all weights to an initial value of 1. -i [ --initial_regressor ] arg Initial regressor(s) --initial_pass_length arg (=18446744073709551615) initial number of examples per pass --initial_t arg (=1) initial t value --lda arg Run lda with <int> topics --lda_alpha arg (=0.100000001) Prior on sparsity of per-document topic weights --lda_rho arg (=0.100000001) Prior on sparsity of topic distributions --lda_D arg (=10000) Number of documents --minibatch arg (=1) Minibatch size, for LDA --span_server arg Location of server for setting up spanning tree --min_prediction arg Smallest prediction to output --max_prediction arg Largest prediction to output --mem arg (=15) memory in bfgs --noconstant Don't add a constant feature --noop do no learning --output_feature_regularizer_binary arg Per feature regularization output file --output_feature_regularizer_text arg Per feature regularization output file, in text --port arg port to listen on --power_t arg (=0.5) t power value -l [ --learning_rate ] arg (=10) Set Learning Rate --passes arg (=1) Number of Training Passes --termination arg (=0.00100000005) Termination threshold -p [ --predictions ] arg File to output predictions to -q [ --quadratic ] arg Create and use quadratic features --quiet Don't output diagnostics --rank arg (=0) rank for matrix factorization. --random_weights arg make initial weights random -r [ --raw_predictions ] arg File to output unnormalized predictions to --save_per_pass Save the model after every pass over data --sendto arg send examples to <host> -t [ --testonly ] Ignore label information and just test --loss_function arg (=squared) Specify the loss function to be used, uses squared by default. Currently available ones are squared, classic, hinge, logistic and quantile. --quantile_tau arg (=0.5) Parameter au associated with Quantile loss. Defaults to 0.5 --unique_id arg (=0) unique id used for cluster parallel jobs --total arg (=1) total number of nodes used in cluster parallel job --node arg (=0) node number in cluster parallel job --sort_features turn this on to disregard order in which features have been defined. This will lead to smaller cache sizes --ngram arg Generate N grams --skips arg Generate skips in N grams. This in conjunction with the ngram tag can be used to generate generalized n-skip-k-gram. vw 6.1 June 2012 VW(1)
All times are GMT -4. The time now is 02:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy