09-13-2006
Why you need that? is it a school work?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file with a list of config files numbered on the lefthand side 1-300. I need to have bash read each lines number and assign it to a variable so it can be chosen by the user called by the script later.
Ex. 1 some data
2 something else
3 more stuff
which number do you... (1 Reply)
Discussion started by: glev2005
1 Replies
2. UNIX for Dummies Questions & Answers
I'm trying to write a programme which scans strings to find how many vowels they contain. I get an error saying that I'm trying to compare a pointer and an integer inif(*v == scanme){. How can I overcome this ? Also, the programme seems to scan only the first word of a string e.g.: if I type "abc... (1 Reply)
Discussion started by: fakuse
1 Replies
3. Shell Programming and Scripting
Dear Perl users,
I need your help to solve my problem below.
I want to print the sequence number without missing number within the range.
E.g. my sequence number :
1 2 3 4 5 6 7 8 11 12 13 14
my desired output:
1 -8 , 11-14
my code below but still problem with the result:
1 - 14
1 -... (2 Replies)
Discussion started by: mandai
2 Replies
4. Shell Programming and Scripting
I would like to print the number of records of 2 files, and divide the two numbers
awk '{print NR}' file1 > output1
awk '{print NR}' file2 > output2
paste output1 output2 > output
awl '{print $1/$2}' output > output_2
is there a faster way? (8 Replies)
Discussion started by: programmerc
8 Replies
5. Shell Programming and Scripting
Hi Power User,
I'm trying to compute this kind of text file format:
file1:
jakarta 100 150
jakarta 170 210
beijing 220 250
beijing 260 280
beijing 290 320
new_york 330 350
new_york 370 420
tokyo 430 470
tokyo 480 ... (2 Replies)
Discussion started by: anjas
2 Replies
6. UNIX for Dummies Questions & Answers
Hi!
I was trying to grep all the words in a wordlist, (twl), with no vowels. I had a hard time figuring out how to do it, but I finally lit on the -v flag. Here's my question:
Why does this work:
grep -v '' twl
But this doesn't:
grep '' twl
In the second example, we're asking for lines... (6 Replies)
Discussion started by: sudon't
6 Replies
7. Shell Programming and Scripting
Input file:
ID_34 2E-69 2324
ID_1 0E0 3254
ID_1 0E0 5434
ID_5 0E0 436
ID_1 1E-14 2524
ID_1 5E-52 46437
ID_3 65E-20 45467
ID_1 0E0 6578
...
Desired output file:
ID_1 0E0 6578
ID_1 0E0 5434
ID_1 0E0 3254
ID_1 5E-52 46437
ID_1 1E-14 2524
ID_3 65E-20 45467 (5 Replies)
Discussion started by: cpp_beginner
5 Replies
8. Shell Programming and Scripting
Hi
I want to use awk to match where field 3 contains a number within string - then print the line and just the number as a new field.
The source file is pipe delimited and looks something like
1|net|ABC Letr1|1530|||
1|net|EXP_1040 ABC|1121|||
1|net|EXP_TG1224|1122|||
1|net|R_North|1123|||... (5 Replies)
Discussion started by: Mudshark
5 Replies
9. Programming
Have difficulty to understand this pure C code to only print vowels twice from input string. Questions are commented at the end of each place.
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
/*
*Demonstrate the use of dispatch tables
*/
/*Print a char... (11 Replies)
Discussion started by: yifangt
11 Replies
LEARN ABOUT CENTOS
tacchtype
thai/wtt.h(3) libthai thai/wtt.h(3)
NAME
thai/wtt.h -
WTT I/O implementation.
SYNOPSIS
Enumerations
enum WTTClass { CTRL = 0, NON = 1, CONS = 2, LV = 3, FV1 = 4, FV2 = 5, FV3 = 6, BV1 = 7, BV2 = 8, BD = 9, TONE = 10, AD1 = 11, AD2 = 12,
AD3 = 13, AV1 = 14, AV2 = 15, AV3 = 16 }
Classification of characters in TIS620 according to WTT.
enum WTTOp { CP = 1, XC = 2, AC = 3, RJ = 4, SR = 5 }
Composibility checking tables.
Functions
WTTClass TACchtype (thchar_t c)
WTT character class.
WTTOp TACio_op (thchar_t c1, thchar_t c2)
WTT I/O operation.
Detailed Description
WTT I/O implementation.
WTT stands for Wing Tuk Tee (in Thai, Runs everywhere). It was defined by TACTIS (Thai API Consortium/Thai Industrial Standard) in the
NECTEC Thai Software Standard Project (1989-1991), and later endorsed by Thai Industrial Standard Institute (TISI) as TIS 1566-2541 in
1998.
WTT classifies Thai chracter(TIS-620) into 17 types below.
ITYPE VALUE SHORT_DESCRIPTION
CTRL 0 control characters
NON 1 non composible characters
CONS 2 consonants
LV 3 leading vowels
FV1 4 following vowels 1
FV2 5 following vowels 2
FV3 6 following vowels 3
BV1 7 below vowels 1
BV2 8 below vowels 2
BD 9 below diacritics
TONE 10 tonemarks
AD1 11 above diacritics 1
AD2 12 above diacritics 2
AD3 13 above diacritics 3
AV1 14 above vowels 1
AV2 15 above vowels 2
AV3 16 above vowels 3
Functions in thctype.h do basic character classifications while wtt.h classifies a chracter in detail. Please refer to the reference.
TACio_op() checks how to compose two given chracters. The possiblities are Composible (CP), Non-display (XC), Accept (AC), Reject (RJ) and
Strict Reject (SR). The values of CP, XC, AC, RJ and SR are difined in wtt.h. And their meanings are:
o CP : second character is displayed in the same cell as the first, also implies an acceptance.
o XC : Do nothing.
o AC : Display second character in the next cell.
o RJ : Discard second character.
o SR : Reject second character only in strict mode.
Enumeration Type Documentation
enum WTTClass
Classification of characters in TIS620 according to WTT.
Enumerator
CTRL control chars
NON non composibles
CONS consonants
LV leading vowels
FV1 following vowels 1
FV2 following vowels 2
FV3 following vowels 3
BV1 below vowels 1
BV2 below vowels 2
BD below diacritics
TONE tonemarks
AD1 above diacritics 1
AD2 above diacritics 2
AD3 above diacritics 3
AV1 above vowels 1
AV2 above vowels 2
AV3 above vowels 3
enum WTTOp
Composibility checking tables.
Enumerator
CP COMPOSIBLE - following char is displayed in the same cell as leading char, also implies ACCEPT
XC Non-display
AC ACCEPT - display the following char in the next cell
RJ REJECT - discard that following char, ignore it
SR STRICT REJECT - REJECT only if in strict mode
Function Documentation
WTTClass TACchtype (thchar_tc)
WTT character class.
Parameters:
c : the character
Returns:
WTT character class { CTRL, ..., AV3 }
WTTOp TACio_op (thchar_tc1, thchar_tc2)
WTT I/O operation.
Parameters:
c1 : previous character
c2 : next character
Returns:
WTT I/O operation { CP, XC, AC, RJ, SR }
Author
Generated automatically by Doxygen for libthai from the source code.
Version 0.1.14 Tue Jun 17 2014 thai/wtt.h(3)