Sponsored Content
Full Discussion: File reading in C
Top Forums Programming File reading in C Post 302404736 by DeepikaNS on Wednesday 17th of March 2010 06:26:31 AM
Old 03-17-2010
Java File reading in C

Hello guys,

I'm finding it really difficult to read from file and display the text on the text entry widget.
This is what i'm suppose to do.Kindly help me out.
Code:
Message ID@9633 
Message Name@CISM_CISM_RECV_REVERSAL_ORDER_ID 
[ 
 
Maximum Length@250*Minimum Length@123*ACK@Nreq*Priority@6*Time out@Refer Note 1*Periodic/Not Periodic@Not periodic*FLOW@Bottom to Top*Assurance of Transmission@Req*Type of Messages@H2CIU 
]

This is my text.I should read the text file and compare using message id or message name. if the id or name matches with what i ask in the combo box,
I should read the corresponding variables within [ and ] and store them in different variables.I have used @ and * as the delimiters.As each variable value(like maximum length,minimum length)have to be stored in different variables and displayed in different text entry widgets.Kindly help me out in this regard.Smilie

Last edited by jim mcnamara; 03-17-2010 at 09:39 AM.. Reason: code tags, please...
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading file names from a file and executing the relative file from shell script

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

2. UNIX for Advanced & Expert Users

Reading a file and sending mail based on content of the file

Hi Gurus, I am having an requirement. i have to read a list file which contains file names and send mail to different users based on the files in the list file. eg. if file a.txt exists then send a mail to a@a.com simillary for b.txt,c.txt etc. Thanks for your help, Nimu (6 Replies)
Discussion started by: nimu1979
6 Replies

3. UNIX for Dummies Questions & Answers

Reading from a file(passing the file as input parameter)

hi I have a shell script say primary.sh . There is a file called params my scenario is primary.sh should read all the values and echo it for example i should pass like $primary.sh params output would be Abc ... (2 Replies)
Discussion started by: ssuresh1999
2 Replies

4. Shell Programming and Scripting

Searching for Log / Bad file and Reading and writing to a flat file

Need to develop a unix shell script for the below requirement and I need your assistance: 1) search for file.log and file.bad file in a directory and read them 2) pull out "Load_Start_Time", "Data_File_Name", "Error_Type" from log file 4) concatinate each row from bad file as... (3 Replies)
Discussion started by: mlpathir
3 Replies

5. Shell Programming and Scripting

fatal: cannot open file `TNAME' for reading (No such file or directory)

Hi, I am running this command through a shell script and getting the error mentioned in the subject line: testing.awk -f x.txt TNAME My testing.awk file contains something like ++++++++++++++++++ #!/usr/bin/awk -f BEGIN{ TAB_NAME="INSERT_ONE_" ARGV ; } if ( $1=="JAM_ONE" &&... (1 Reply)
Discussion started by: kunwar
1 Replies

6. Shell Programming and Scripting

Reading UNIX commands from file and redirecting output to a file

Hi All I have written the following script: #!/bin/ksh while read cmdline do echo `$cmdline` pid="$cmdline" done<commands.txt =========== commands.txt contains: ps -ef | grep abc | grep xyz |awk '{print $2}; My objective is to store the o/p of the command in a variable and do... (8 Replies)
Discussion started by: rahulparo
8 Replies

7. UNIX for Dummies Questions & Answers

Reading XML file and print the values in the text file using Linux shell script

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

8. UNIX for Dummies Questions & Answers

Reading Xml file and print the values into the text file in columnwise?

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>... (4 Replies)
Discussion started by: sravanreddy
4 Replies

9. Shell Programming and Scripting

ksh Script, Reading A File, Grepping A File Contents In Another File

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
gettxt(3)						     Library Functions Manual							 gettxt(3)

NAME
gettxt - Retrieves a text string from a message catalog LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <unistd.h> char *gettxt ( const char *msgid const char *dflt_str ); PARAMETERS
Specifies the message identification string. The format of this string is discussed in more detail below. Specifies the default string to use if the identified string is not found. DESCRIPTION
A message catalog contains text strings that can be accessed by programs. Message catalogs are created using the gencat and mkcatdefs com- mands. The gettxt function searches a message catalog for a specified text string. If the text string is available, it is returned. If attempts to retrieve the text string do not succeed, the specified default text string is used. You can request that messages be displayed in a specific language by setting environment variables. Likewise, you can also change the lan- guage in which the messages are displayed by invoking the setlocale function with the appropriate arguments. To retrieve a text string, the program must use the following format when specifying the msgid parameter: [msgfilename]:msgnumber The arguments are defined as follows: Specifies the message catalog that contains the localized version of the text string. Characters in the text string can be any set of characters excluding null (), the ASCII symbols for slash (/), and the colon (:). Specified as a posi- tive number only, this argument denotes the index of the text string in the message catalog. If the text string specified does not exist in the catalog associated with the locale setting, or if the message number exceeds the bounds of the catalog, attempts are made to retrieve this message from the catalog for the C locale. Should the second attempt be unsuccessful, the text string specified by the dflt_str is used. RETURN VALUES
The string Message not found!! is returned if the value for the msgfilename argument is invalid, a catalog number has not been specified, the value for msgnumber is not a positive number, or a message could not be retrieved and the dflt_str parameter was not specified. ERRORS
No errors are defined for this function. RESTRICTIONS
On this operating system, the gettxt function parses the directory locale as described on the catopen(3) and catgets(3) reference pages. RELATED INFORMATION
Commands: gencat(1), mkcatdefs(1) Functions: catgets(3), catopen(3) delim off gettxt(3)
All times are GMT -4. The time now is 05:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy