Sponsored Content
Top Forums Programming Simple C program to count word lengths Post 302985547 by rovf on Friday 11th of November 2016 05:47:07 AM
Old 11-11-2016
Quote:
Originally Posted by Riker1204
can I do tracing similar to bash
Perhaps if you use a suitable C interpreter. I haven't tried it, but you could have a look at Ch : Ch -- an embeddable C/C++ interpreter, C and C++ scripting language
 

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
gtans(6)							   Games Manual 							  gtans(6)

NAME
gtans - Tangram game for X SYNOPSIS
gtans [no options] DESCRIPTION
Gtans is a tangram game that runs in X. Tangram is a kind of puzzle game where the player has to arrange a set of pieces to match a given shape. OPTIONS
No command-line options Use the graphical interface to customize the program. See below. USAGE
move the pieces (known as tans) until they match the figure drawn on the right window. You must always use the seven tans and they should not be laid on top of one another. To move a tan, click and drag it with left mouse button, for rotation click AROUND it. You can flip the selected tan by right-clicking. This is usefull for the parallelogram tan (all positions can not be reached by rotating only). If you are a beginner to Tangram you should try the first 10 figures. The other ones are not sorted, some of them are very difficult (to my taste). When a figure has been solved the background color of the silhouette area changes. The solved figures are remembered by saving a status file in the user's directory (~/.gtans/afile.figures.status for a figure file called afile.figures) Show a tan This button shows the position of a tan. Each further click will display an other tan. Show outline Draw the figure in the main area. This makes the game much easier. Preferences Most of this menu's options allow you to change the colors used by the game. For the main area you may choose textures (pixmap files) instead of colors. Some sample files are supplied (I can't remember where I found them) but as the complete pathname is saved in the config file you can choose a file located anywhere (for example in /usr/share/pixmaps/). On a 8 bits display the colors may not be exactly what you want (GTK tries to find the best matching color). Preferences/Tans size/Increase Makes the tans 5 % bigger relatively to the game area. If you resize the window the tans size will be scaled. Preferences/Tans size/Decrease Makes the tans 4.76 % smaller Preferences/Accuracy Changes the precision of the comparison between the tans position and the solution. A lower accuracy makes the game more easy. Preferences/Rotation Step by step allows only rotation by increment of 11.5 degrees. Continuous rotation makes the game more difficult and you probably shouldn't use it unless you really dislike step by step rotation. Preferences/Figures file Allows you to choose another figures file. Preferences/Save config Save a config file in the user's home directory. Misc/Clear figure status Set the current figure as unsolved. Misc/Clear all figures status Set all the loaded figures (i.e. from the current figure file) as unsolved. FILES
~/.gtans/.gtansrc Configuration options for gtans. All of these options can be set from the interface, there should be no need to edit this file. ~/.gtans/somename.figures.status Status files (for each figures file the user played with) remenbering which figures where solved. SEE ALSO
The gtans homepage at <http://gtans.sourceforge.net/>. Additional information and documentation can also be found in /usr/share/doc/gtans/ . AUTHOR
The author of gtans is Philippe Banwarth <bwt@users.sourceforge.net> February 2000 gtans(6)
All times are GMT -4. The time now is 03:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy