Reading tokens


 
Thread Tools Search this Thread
Top Forums Programming Reading tokens
# 1  
Old 05-20-2014
Write a method that parses out the delimiters once and returns an array container object of String. Write a loop to iterate the array and convert numbers if necessary.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Count lines with similar tokens

I have 2 files, and I wish to count number of lines with this characteristic: if any token at line x in file1, is similar to a token at line x in file2. Here's an example: file1: ab, abc ef fg file2: ab cd ef gh In this case I wish to get 3. Note that token of file1 are... (3 Replies)
Discussion started by: Viernes
3 Replies

2. Shell Programming and Scripting

Get tokens from line and put them into an array

I have a line like: IDNO H1 H2 H3 HT Q1 Q2 Q3 Q4 Q5 M1 M2 EXAM I would like to be able to access these tokens in such a way: echo $myline #displays IDNO Is this possible to do in a shell script? (3 Replies)
Discussion started by: afulldevnull
3 Replies

3. Shell Programming and Scripting

Need tokens in shell script

Hi All, Im writing a shell script in which I want to get the folder names in one folder to be used in for loop. I have used: packsName=$(cd ~/packs/Acquisitions; ls -l| awk '{print $9}') echo $packsName o/p: opt temp user1 user2 ie. Im getting the output as a string. But I want... (3 Replies)
Discussion started by: AB10
3 Replies

4. Shell Programming and Scripting

+: more tokens expected

Hey everyone, i needed some help with this one. We move into a new file system (which should be the same as the previous one, other than the name directory has changed) and the script worked fine in the old file system and not the new. I'm trying to add the results from one with another but i'm... (4 Replies)
Discussion started by: senormarquez
4 Replies

5. Shell Programming and Scripting

Replacing tokens

Hi all, I have a variable with value DateFileFormat=NAME.CODE.CON.01.#.S001.V1.D$.hent.txt I want this variable to get replaced with : var2 is a variable with string value DateFileFormat=NAME\\.CODE\\.CON\\.01\\.var2\\.S001\\.V1\\.D+\\.hent\\.txt\\.xml$ Please Help (3 Replies)
Discussion started by: abhinav192
3 Replies

6. UNIX for Advanced & Expert Users

Find and eliminate duplcate tokens

I have a file like this: =value1 =value2 . . . =valuen The issue is that if we get to have i.e. the line duplicated it may incurr into errors in our application. I tried to find those repeated lines with something like uniq -cd prueba1.txt But it only found the repeated lines that are... (5 Replies)
Discussion started by: MWPita
5 Replies

7. Shell Programming and Scripting

selecting tokens from a string...

i store the output of ls in a variable FL $FL=`ls` $echo $FL f1.txt f2.txt f3.txt f4.txt f5.txt script.sh script.sh~ test.txt now if i want to retrive the sub-string "f1.txt" from $FL we were taught that this is what i have to do $set $FL $echo $1 f1.txt and echo $2 would give... (1 Reply)
Discussion started by: c_d
1 Replies

8. Shell Programming and Scripting

: + : more tokens expected

Hello- Trying to add two numbers in a ksh shell scripts and i get this error every time I execute stat1_ex.ksh: + : more tokens expected stat1=`cat .stat1a.tmp | cut -f2 -d" "` stat2=`cat .stat2a.tmp | cut -f2 -d" "` j=$(($stat1 + $stat2)) # < Here a the like the errors out echo $j... (3 Replies)
Discussion started by: Nomaad
3 Replies

9. Shell Programming and Scripting

reverse tokens with sed

I currently use this bash for loop below to reverse a set of tokens, example "abc def ghi" to "ghi def abc" but in looking at various sed one liner postings I notice two methods to reverse lines of text from a file (emulating tac) and reversing letters in a string (emulating rev) so I've spent some... (1 Reply)
Discussion started by: markc
1 Replies

10. UNIX for Dummies Questions & Answers

tokens in unix ?

im trying to remove all occurences of " OF xyz " in a file where xyz could be any word assuming xyz is the last word on the line but I won't always be. at the moment I have sed 's/OF.*//' but I want a nicer solution which could be in pseudo code sed 's/OF.* (next token)//' Is... (6 Replies)
Discussion started by: seaten
6 Replies
Login or Register to Ask a Question
XtErrorMsg(3)						    XT COMPATIBILITY FUNCTIONS						     XtErrorMsg(3)

NAME
XtErrorMsg, XtSetErrorMsgHandler, XtWarningMsg, XtSetWarningMsgHandler - high-level error handlers SYNTAX
void XtErrorMsg(String name, String type, String class, String default, String *params, Cardinal *num_params); void XtSetErrorMsgHandler(XtErrorMsgHandler msg_handler); void XtSetWarningMsgHandler(XtErrorMsgHandler msg_handler); void XtWarningMsg(String name, String type, String class, String default, String *params, Cardinal *num_params); ARGUMENTS
class Specifies the resource class. default Specifies the default message to use. name Specifies the general kind of error. type Specifies the detailed name of the error. msg_handler Specifies the new fatal error procedure, which should not return or the nonfatal error procedure, which usually returns. num_params Specifies the number of values in the parameter list. params Specifies a pointer to a list of values to be stored in the message. DESCRIPTION
The XtErrorMsg function has been superceded by XtAppErrorMsg. The XtSetErrorMsgHandler function has been superceded by XtAppSetErrorMsgHandler. The XtSetWarningMsgHandler function has been superceded by XtAppSetWarningMsgHandler. The XtWarningMsg function has been superceded by XtAppWarningMsg SEE ALSO
XtAppErrorMsg(3) X Toolkit Intrinsics - C Language Interface Xlib - C Language X Interface X Version 11 libXt 1.1.3 XtErrorMsg(3)