how to read the variable from config file
eg: a.cfg below config file config file which contain
a=`hostname`
b=250
a.sh is shell script
echo "$a and $b"
if i run "a.sh 1.cfg" it works
but when i declare N number of variable it wont works..
can u please suggest for that ? (1 Reply)
Hello All,
I have a config file which has the following data :
export DBCHECKSUM001="/home/srvcdesk/DBCheckSum/DBCheckSum001.cfg"
export DBCHECKSUM002="/home/srvcdesk/DBCheckSum/DBCheckSum002.cfg"
export DBCHECKSUM003="/home/srvcdesk/DBCheckSum/DBCheckSum003.cfg"
export... (1 Reply)
Hi To All Genius out there,
We are running autosys application on solaris 10. In autosys we have a configuration file that contains an Autosys instance configuration data and is located on a NFS filer on which we have a read-only access.
Our Autosys environment is on a dual server... (0 Replies)
Hi To All Genius out there,
We are running autosys application on solaris 10. In autosys we have a configuration file that contains an Autosys instance configuration data and is located on a NFS filer on which we have a read-only access.
Our Autosys environment is on a dual server mode(Active... (0 Replies)
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
how to read the variable indivdually ( line by line ) in shell script
eg :
i have the config file where contain
cat /home/user01/ilap/conf/input.conf
node.txt
node2.txt
node3.txt
i need to run script like
/home/user01/ilap/exe/run.sh /home/user01/ilap/conf/input.conf
... (1 Reply)
Hi,
I want to configure some values in config file like below
work_dir /home/work
csv_dir /home/csv
sql_dir /home/sqls
reportfirst yes
and i want to store each value in variable to use it further in my my perl program ??
any thought on this(i am new to perl) ?
... (2 Replies)
Hi All,
Can anyone please explain me how to read data from config file in Perl.
Suppose i have a config file named cfile. The data in config file is
name=parth
lname=mittal
user=2007
hostname=fluoride
username=parthmittal
password=XXXXXX
account=unix
url=www.unix.com
... (2 Replies)
Dears,
Need help to implement below requirement
A file (detail.txt)contain :
1st column: Stream
2nd column: PathAddress
3rd column: Counterlimit
4th column: TransactionDateColumn
5th column: DateType
6th column: SleepValue
7th column: Status
Need to write a... (1 Reply)
Discussion started by: sadique.manzar
1 Replies
LEARN ABOUT LINUX
error_one_per_line
ERROR(3) Linux Programmer's Manual ERROR(3)NAME
error, error_at_line, error_message_count, error_on_per_line, error_print_progname - glibc error reporting functions
SYNOPSIS
#include <error.h>
void error(int status, int errnum, const char *format, ...);
void error_at_line(int status, int errnum, const char *filename,
unsigned int linenum, const char *format, ...);
extern unsigned int error_message_count;
extern int error_one_per_line;
extern void (* error_print_progname) (void);
DESCRIPTION
error() is a general error-reporting function. It flushes stdout, and then outputs to stderr the program name, a colon and a space, the
message specified by the printf(3)-style format string format, and, if errnum is nonzero, a second colon and a space followed by the string
given by strerror(errnum). Any arguments required for format should follow format in the argument list. The output is terminated by a
newline character.
The program name printed by error() is the value of the global variable program_invocation_name(3). program_invocation_name initially has
the same value as main()'s argv[0]. The value of this variable can be modified to change the output of error().
If status has a nonzero value, then error() calls exit(3) to terminate the program using the given value as the exit status.
The error_at_line() function is exactly the same as error(), except for the addition of the arguments filename and linenum. The output
produced is as for error(), except that after the program name are written: a colon, the value of filename, a colon, and the value of
linenum. The preprocessor values __LINE__ and __FILE__ may be useful when calling error_at_line(), but other values can also be used. For
example, these arguments could refer to a location in an input file.
If the global variable error_one_per_line is set nonzero, a sequence of error_at_line() calls with the same value of filename and linenum
will result in only one message (the first) being output.
The global variable error_message_count counts the number of messages that have been output by error() and error_at_line().
If the global variable error_print_progname is assigned the address of a function (i.e., is not NULL), then that function is called instead
of prefixing the message with the program name and colon. The function should print a suitable string to stderr.
CONFORMING TO
These functions and variables are GNU extensions, and should not be used in programs intended to be portable.
SEE ALSO err(3), errno(3), exit(3), perror(3), program_invocation_name(3), strerror(3)COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2010-08-29 ERROR(3)