04-17-2008
You need to use:
count=`expr $count + 1`
No spaces around the the equals sign. No dollar sign in front of count when you are assigning it a value. But this doesn't explain the error you mentioned. I suspect you posted different code than you are really running. Look carefully at the those double quotes in your real code. Are you missing one?
9 More Discussions You Might Find Interesting
1. Programming
Iam new to shellscript.
1)How to strart QUERYMANAGER using shellscript.
2)How to put and get messages in MQSeries using shellscripts.
3)iam using local queues .
Thanks lot. (0 Replies)
Discussion started by: ram2s2001
0 Replies
2. UNIX for Advanced & Expert Users
hI,
Pls consider the following shell script
#!/bin/csh -f
sqlplus tkyte/tkyte <<"EOF" > tmp.csh
set serveroutput on
declare
a number:=5;
begin
dbms_output.put_line( 'a:='||a );
end;
/
spool off
"EOF"
The above script does the followin
1)it connects... (1 Reply)
Discussion started by: ravi raj kumar
1 Replies
3. Shell Programming and Scripting
Hello. I am a novince at writing shell scripts but here is the question. I have to write a shell script that does the following:
Once executed via crontab, the script should do the following:
a. get date/time stamp in for format 10-MAR-05 and
b. execute shell script my_script.sh (which... (2 Replies)
Discussion started by: jigarlakhani
2 Replies
4. UNIX for Dummies Questions & Answers
Hello everyone,
Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware.
I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies
5. Shell Programming and Scripting
Hello everyone,
I am having to do a lot of perl scripting these days and I am learning a lot.
I have this problem
I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files..
there is folder1\folder2\*.gz
and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies
6. Shell Programming and Scripting
Hi,
I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script.
I have a files named in this format... (13 Replies)
Discussion started by: xytiz
13 Replies
7. Shell Programming and Scripting
Hi,
I want to do automation on UI using shellscript.
eg:
1) Drop down menu contains assign , investigate, closed.
now there is one id want assign it using assign tab then need to investigate it and lastly close. Sometimes the id can't assign to perticular user.
there are so many... (11 Replies)
Discussion started by: aish11
11 Replies
8. Shell Programming and Scripting
I am new in shell script i want to convert .txt file
in the format axsjdijdjjdk to
a
x
s
j
d
i
j
d
j
j
d
k (5 Replies)
Discussion started by: sreejithalokkan
5 Replies
9. Shell Programming and Scripting
cat << EOF | telnet alt1.aspmx.l.google.com 25
HELO verify-email.org
MAIL FROM: <check@verify-email.org>
RCPT TO: <test@gmail.com>
quit
EOF
Hello, I'm trying to get the result of that execution, and can not see the result or bring it to a txt ... the direct command in ssh running the result... (5 Replies)
Discussion started by: c0i0t3
5 Replies
CFGET(1) User Commands CFGET(1)
NAME
cfget - get values from a config file
SYNOPSIS
cfget [options] section/key
cfget [options] --dump=STYLE [section/key [section/key...]]
cfget [options] --template=STYLE [infile [outfile]]
DESCRIPTION
Get values from a config file.
cfget is a simple tool to read values from configuration files. It is useful, for example, to create configurable shellscripts or make-
files.
It can also be configured to support virtual configuration values that, if not present in the config file, are automatically computed from
the existing values. This makes it convenient, for example, to get a "duration" value from a configuration file that only contains a "start
date" and an "end date".
OPTIONS
--version
show program's version number and exit
-h, --help
show this help message and exit
-q, --quiet
quiet mode: only output fatal errors
-v, --verbose
verbose mode
--debug
verbose mode
-C file, --cfg=file
config file to read; the option can be given more than once to read more than one file. If missing, read a colon separated list from
the CFGET_CFG env variable.
-P file, --plugin=file
list of plugin files or directories to load. The option can be given more than once to read more than one file. If missing, read a
colon separated list from the CFGET_PLUGINS env variable.
-d name, --dump=name
dump the contents of the database using the given style. Use '--dump=list' for a list of available styles. If one or more paths are
provided in the command line, dump only those paths, otherwise dump all.
-t name, --template=name
read a template file, expand template placeholders using the configuration data and output the result. Use '--template=list' for a
list of available styles.
-f name, --format=name
use a custom configuration file format (default: ini). Use '--format=list' for a list of available formats. The CFGET_FORMAT envi-
ronment value, if defined, can be used to provide a different default value.
-r path, --root=path
restrict all work to values under the given path
EXAMPLES
# Get a key from a config file
cfget -C file.ini general/name
# More can be specified, they will be searched in order
cfget -C general.ini -C local.ini general/name
# Use a plugin to add virtual entries
cfget -C file.ini --plugin=virtual.py general/name
# A plugin can also a directory containing .py files
# and plugins can also be specified more than once
cfget -C file.ini --plugin=virtual.py --plugin=virtual/ general/name
# In a shellscript, you may want to use environment variables if you
# invoke cfget many times:
#!/bin/sh
CFGET_CFG=general.ini:local.ini
CFGET_PLUGINS=virtual.py:virtual/
START=`cfget general/start`
END=`cfget general/end`
DURATION=`cfget general/duration`
# Quick way to copy all config values to the environment
eval `cfget --dump=exports -C file.ini`
# Autoconf-style template substitution
cfget --template=autoconf -C file.ini script.in script
# Curly braces substitude literally
cfget -C file.ini "general/start_{general/type}"
# One can use simple expressions
cfget -C file.ini "general/start + general/duration"
cfget -C file.ini "round(general/age / 2)"
AUTHOR
cfget has been written by Enrico Zini <enrico@enricozini.org>.
cfget 0.15 July 2010 CFGET(1)