02-28-2013
It works for me!
It should be something to do with your input file. Can you post few lines from your original input file in code tags ?
This User Gave Thanks to Yoda For This Post:
9 More Discussions You Might Find Interesting
1. Programming
Hi,
I'm trying to read a file in with and assigne the stream to a char * type. I've manged it using the cin.get returning type char, but am having run-time problems returning a char *. For example,
char *pStream = "file.txt";
ifstream from(pStream);
from.open(pStream);
... (1 Reply)
Discussion started by: Breen
1 Replies
2. UNIX for Dummies Questions & Answers
hi,
I have a file containing names, say n number of names,
sample file
robin
smith
dallas
frey
cook
all these names are in a file name called names.txt and it is placed in a directory called /data/names
all i want is to write a script, which will read from the file and gives the... (3 Replies)
Discussion started by: vasikaran
3 Replies
3. Shell Programming and Scripting
Hi
How can i dynamically read files names from a list file and execute them from a single shell script.
Please help its urgent
Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies
4. Shell Programming and Scripting
Hi All,
My requirement is:
1. To read a file that contains log file location and server name. The format of the file is something like this :
server_name1:logfilename1
server_name2:logfilename2
2. Now I wants to grep "error" string from the logfilename and put it into another file for... (3 Replies)
Discussion started by: acheiver
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I am a beginner in scripting...I have to do a script where I have to read a file which has list of job names, line by line and for every line execute a dsjob command to find the log details of the job and extract only the start time of the job, if it is greater than jan 01 2008 and create... (1 Reply)
Discussion started by: Vijay81
1 Replies
6. Shell Programming and Scripting
I have a file that looks like this:
cat includes
CORP-CRASHTEST-BU
e:\crashplan\
CORP-TEST
/usr/openv/java
/usr/openv/logs
/usr/openv/man
CORP-LABS_TEST
/usr/openv/java
/usr/openv/logs
/usr/openv/man
What I want to do is make three new files with just those selections. So the three... (4 Replies)
Discussion started by: newbie2010
4 Replies
7. UNIX for Dummies Questions & Answers
I am trying to find an example for reading an array instead of reading a file and send out an email in ksh. Can you please help is that possible?
Algorithm
#!/bin/ksh
i=0
set -A ARR
if
then
let i=$
ARR="A does n't match with B"
fi
if
then
let i=$
ARR="P does n't match with Q"... (11 Replies)
Discussion started by: Ariean
11 Replies
8. UNIX for Dummies Questions & Answers
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (1 Reply)
Discussion started by: sravanreddy
1 Replies
9. Shell Programming and Scripting
So I'm stumped.
First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes.
I have a text file (file_source) of terms, each line... (3 Replies)
Discussion started by: Brusimm
3 Replies
LEARN ABOUT ULTRIX
xrmuniquequark
XrmUniqueQuark(3X11) MIT X11R4 XrmUniqueQuark(3X11)
Name
XrmUniqueQuark, XrmStringToQuark, XrmQuarkToString, XrmStringToQuarkList, XrmStringToBindingQuarkList - manipulate resource quarks
Syntax
XrmQuark XrmUniqueQuark()
#define XrmStringToName(string) XrmStringToQuark(string) #define XrmStringToClass(string) XrmStringToQuark(string) #define XrmStringToRep-
resentation(string) XrmStringToQuark(string)
XrmQuark XrmStringToQuark(string)
char *string;
#define XrmNameToString(name) XrmQuarkToString(name) #define XrmClassToString(class) XrmQuarkToString(class) #define XrmRepresentation-
ToString(type) XrmQuarkToString(type)
char *XrmQuarkToString(quark)
XrmQuark quark;
#define XrmStringToNameList(str, name) XrmStringToQuarkList((str), (name)) #define XrmStringToClassList(str,class) XrmStringToQuark-
List((str), (class))
void XrmStringToQuarkList(string, quarks_return)
char *string;
XrmQuarkList quarks_return;
XrmStringToBindingQuarkList(string, bindings_return, quarks_return)
char *string;
XrmBindingList bindings_return;
XrmQuarkList quarks_return;
Arguments
bindings_return
Returns the binding list.
quark Specifies the quark for which the equivalent string is desired.
quarks_return
Returns the list of quarks.
string Specifies the string for which a quark is to be allocated.
Description
The function allocates a quark that is guaranteed not to represent any string that is known to the resource manager.
These functions can be used to convert to and from quark representations. The string pointed to by the return value must not be modified
or freed. If no string exists for that quark, returns NULL.
The function converts the specified resource quark representation back to a string.
The function converts the null-terminated string (generally a fully qualified name) to a list of quarks. Note that the string must be in
the valid ResourceName format. The components of the string are separated by a period or asterisk character.
A binding list is a list of type and indicates if components of name or class lists are bound tightly or loosely (that is, if wildcarding
of intermediate components is specified).
typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding,
*XrmBindingList;
indicates that a period separates the components, and indicates that an asterisk separates the components.
The function converts the specified string to a binding list and a quark list. Component names in the list are separated by a period or an
asterisk character. If the string does not start with period or asterisk, a period is assumed. For example, ``*a.b*c'' becomes:
quarks a b c
bindings loose tightloose
See Also
XrmGetResource(3X11), XrmInitialize(3X11), XrmMergeDatabases(3X11), XrmPutResource(3X11)
X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys
XrmUniqueQuark(3X11)