Sponsored Content
Top Forums Shell Programming and Scripting Reading a value from the configuration file Post 302288007 by yoursdavinder on Monday 16th of February 2009 08:02:48 AM
Old 02-16-2009
Quote:
Originally Posted by Franklin52
Dos/windows editors place a line feed and a carriage return character at the end of each line of a text file, but Unix uses only a line feed character.
The code is to get rid of the carriage return.

Regards
Got your point but I am not able to get where and how to use it in my code... Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Configuration file?

Anyone know which configuration file stores the users who are not permitted to use the at command? (2 Replies)
Discussion started by: Relykk
2 Replies

2. Shell Programming and Scripting

How to create iso file according configuration file?

Hi folks, I have the following configuration file,which contains list of directories: /tmp> cat utils.conf Backup CPSync Change_Listener_Port Create_Database Deinstall Install_CPPlugin Project_migrator I have the following command in my ksh program: mkisofs -l -L -R -V ${PACK_NAME}... (1 Reply)
Discussion started by: nir_s
1 Replies

3. 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

4. Shell Programming and Scripting

Extracting data from text file based on configuration set in config file

Hi , a:) i have configuration file with pattren <Range start no>,<Range end no>,<type of records to be extracted from the data file>,<name of the file to store output> eg: myfile.confg 9899000000,9899999999,DATA,b.dat 9899000000,9899999999,SMS,a.dat b:) Stucture of my data file is... (3 Replies)
Discussion started by: suparnbector
3 Replies

5. Shell Programming and Scripting

configuration file

i am trying to use a configuration file to FTP some files.. i am not sure how to call or use a configuration file in script. can anybody help (5 Replies)
Discussion started by: iamcool
5 Replies

6. Solaris

configuration file

Hi all-interesting forum. I am new with Solaris and i would like your advice on this: I am using a solaris 8 (ultra sparc IIi) workstation at my work,and i am trying to built another one exactly the same-so if the first one fails to have another one as backup. The problem is that the guy who... (1 Reply)
Discussion started by: ioa_pol
1 Replies

7. Shell Programming and Scripting

Configuration File

Hi I need a cofiguration file for my perl script... Suppose my perl script for counting total number of user is #!/usr/bin/perl -w $total_users; #To get how many users currently logged in########### $total_users=`who | wc -l`; print... (2 Replies)
Discussion started by: Harikrishna
2 Replies

8. Shell Programming and Scripting

reading configuration files in bash. Best way?

Context: I have a random pin number generator script that reads a tab-delimited file containing a location and a count: eg., mansfield 30 tokyo 15 smithville 34It produces random PIN# in the amount specified by the number in the second column. Currently, I read the file... (7 Replies)
Discussion started by: Bubnoff
7 Replies

9. Programming

Reading a router configuration file

Hello C specialists, I'm trying to write a program to read out a binary configuration file produced by a router. But the output of Name and Value is cryptic. What's going wrong? The structure of the binary file is very simple: struct nvram_tuple { char *name; char *value; ... (5 Replies)
Discussion started by: digidax
5 Replies

10. 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
GENCAT(1)						    BSD General Commands Manual 						 GENCAT(1)

NAME
gencat -- generates a Native Language Support (NLS) message catalog file SYNOPSIS
gencat catfile [msgfile|- ...] DESCRIPTION
The gencat utility generates a formatted message catalog catfile from stdin or one or more message source text files msgfile. The file catfile is created if it does not already exist. If catfile does exist, its messages are included in the new catfile. The new message text defined in msgfile replaces the old message text currently in catfile when the set and message numbers match. The generated message catalog contains message strings that will be retrieved using the catgets(3) library call. These messages are dynami- cally loaded by the Native Language Support (NLS) library at run time. Error messages are grouped into sets, and a program can load a par- ticular set depending on which type, or language, of messages is desired. Message Text Source File Format The message text source files are text files in the format described below. Note that the fields of a message text source line are separated by space or tab characters. $set n comment Determines the set identifier to be used for all subsequent messages until the next $set or end-of-file. The n is the set identifier which is defined as a number in the range [1, NL_SETMAX]. Set identifiers within a single source file need not be contiguous. Any string following the set identifier is treated as a comment. If no $set directive is specified in a message text source file, all mes- sages will be located in the default message set NL_SETD. $delset n comment Removes message set n from the catalog. The n is a set identifier in the range [1, NL_SETMAX]. If a message set was created earlier in the current file, or in a file previously read by the gencat command, this directive will remove it. Any string following the set iden- tifier is treated as a comment. $ comment A line beginning with $ followed by a space or tab character is treated as a comment. m message-text A message line consists of a message identifier m in the range [1, NL_MSGMAX] and the message-text. The message-text is read until the end of the line or a quote character (if one is specified). The message-text is stored in the message catalog with the set identifier specified by the last $set directive, and the message identifier m. If the message-text is empty and there is a space or tab character following the message identifier, an empty string is stored in the message catalog. If no message-text is provided, and if there is no space or tab character following the message identifier, the message with the message identifier m in the current set is removed from the catalog. Message identifiers need not be contiguous within a single set. The length of message-text must be in the range [0, NL_TEXTMAX]. $quote c Sets an optional quote character to be used around the message-text. The quote character c may be any character other than white space. If this is specified, then messages must begin and end with the quote character. This is useful when messages must contain leading white space. By default no quote character is used. If an empty $quote directive is specified, then the current quote character is unset. Empty lines and leading blanks in a message text source file are ignored. Any line beginning with any character other than those described above is ignored as a syntax error. Text message strings may contain any characters and the following special characters and escape sequences. Description Symbol Sequence newline NL(LF) horizontal tab HT vertical tab VT v backspace BS  carriage return CR form feed FF f backslash \ bit pattern ddd ddd A bit pattern, ddd, consists of a backslash followed by one, two, or three octal digits representing the value of the character. The cur- rent quote character, if defined, may be escaped with a backslash to generate the quote character. Any character following the backslash ('') other than those specified is ignored. A backslash at the end of the line continues the message onto the next line. The following two lines are an example of such a message: 1 This message continues on the next line Producing the following message: 1 This message continues on the next line EXIT STATUS
The gencat utility exits 0 on success, and >0 if an error occurs. SEE ALSO
catclose(3), catgets(3), catopen(3), nls(7) AUTHORS
The Native Language Support (NLS) message catalog facility was contributed by J.T. Conklin <jtc@NetBSD.org>. This page was originally writ- ten by Kee Hinckley <nazgul@somewhere.com>. BSD
December 29, 2011 BSD
All times are GMT -4. The time now is 10:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy