03-22-2010
Why don't you post the scripts (or the relevant portions of them) here? It is - if you allow me this analogy - difficult to suggest a move in a chess position you are not allowed to even look at - even for a good player.
Second, why don't you give my suggestion a try? Exporting a variable is like creating a global variable in a normal programming language: bad programming style and very probably leading to problems sooner or later.
bakunin
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm trying to pass a filename, or all the files in the current directory to the ls command with a script. Unsuccessful so far, here are a few of my attempts:
#!/bin/ksh
read fname
#if (( $# > 0 )); then
$fname | ls -l
#fi
this produces a long listing of all the files in my current... (4 Replies)
Discussion started by: jpprial
4 Replies
2. Shell Programming and Scripting
Hi All,
I need some info.
Could you please tell me how to use the variable of a parent shell in the subshell. Also can we modify the variable in the subshell ? If yes, will the modified variable visible in the parent shell
I am using two prg.
a.sh
#!/usr/bin/ksh
temp_var="abhishek"... (3 Replies)
Discussion started by: AbhishekG
3 Replies
3. Shell Programming and Scripting
Hi,
I have a script which adds the user credentials to an ldap server. Im passing the variables as below..
/path/my_script $uname $pwd $environ ${deposit}
If i enter some special characters like ';' in $pwd, script returns an error which is set to display if the user enters... (5 Replies)
Discussion started by: Tuxidow
5 Replies
4. Shell Programming and Scripting
Hi
I have a script to which I pass multiple arguments, for example lets say the script name is "abc". I run the script like
./abc def /file <directory location>
In the above "def" is the first argument and "/file" is the second argument. I expect <directory location> that is passed after... (4 Replies)
Discussion started by: zmfcat1
4 Replies
5. UNIX for Dummies Questions & Answers
I need to pass arguments to a shell script.My batch is calling some java program.
#################
x=$1
y=$2
java -classpath program
###################
if first parameter and second parameter is null then
java -classpath program
if first parameter is not null and second parameter is... (3 Replies)
Discussion started by: mnjx
3 Replies
6. Shell Programming and Scripting
I have noticed this thing using csh when passing arguments
Suppose I call a csh script using
../Scripts/plot-model.csh -vmod="npt02-z30.vmod" -R="0/80/0/30" -c="0/4.5" -aspr="1:10"
Somehow the " get removed when doing
$argv
ending up with
-vmod=npt02-z30.vmod... (0 Replies)
Discussion started by: kristinu
0 Replies
7. Shell Programming and Scripting
Hi ..
Can any one please tell how to pass argument to shell script at runtime?
I want to implement funcnality just like bc, where we can provide input while script is running and can be used later in the same script.
Thanks in advance... (1 Reply)
Discussion started by: kunjalhg
1 Replies
8. Shell Programming and Scripting
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
Discussion started by: goddevil
19 Replies
9. Shell Programming and Scripting
Hi,
i have a file.txt with data
Bangalore
Chennai
Hyd
filename of the script is: new.sh
result=`cat file.txt | grep $1`
if
then
echo pass
else
echo fail
fi
i am executing the file in the cmd line as "sh new.sh Bangalore"
o/p is pass
if i give "sh new.sh delhi"
o/p is... (6 Replies)
Discussion started by: harsha85
6 Replies
10. Shell Programming and Scripting
Hi,
I know with getopts you can pass arguments from the command line
./script -ab -c apple
But it doesn't support 2 or more arguments for ONE option. Is there any other way to do this?
Thanks (2 Replies)
Discussion started by: testa500
2 Replies
LEARN ABOUT SUSE
capisuite
CAPISUITE(8) CAPISUITE(8)
NAME
capisuite - Python-scriptable ISDN telecommunication suite
DESCRIPTION
CapiSuite is a Python-scriptable ISDN telecommunication suite. It uses the new CAPI interface for accessing your ISDN-hardware - so you'll
need a card for which a CAPI compatible driver is available. Currently these are all cards manufactured by AVM and some Eicon cards.
This man page only gives a short introduction, for the real documentation please see the HTML or PDF manual distributed with CapiSuite.
CapiSuite tries to give the user the ability to code his own ISDN applications without having to fiddle around with all the dirty program-
ming details like callback functions, data buffers, protocol settings and so on.
I took a scripting language which is (in my opinion) very easy to understand, to use and to learn - especially for beginners: Python. I
extended it with some functions providing the basic ISDN "building blocks" for the users application. Behind these functions the heart of
CapiSuite implements all the dirty details a user isn't interested in. My goal was to make script-coding as simple as possible but to also
give you the flexibility to realize what you want.
To give you an impression, coding a simple answering machine is as easy as:.IP .nf def callIncoming (call, service, call_from, call_to):
connect_voice (call, 10) # answer call after 10 secs audio_send (call, "announcemnt.la") # play announcement audio_send (call, "beep.la") #
play beep audio_receive (call, "call.la", 10) # record call .fi
Of course some details are missing like creating a unique filename or storing the additional information (called and calling party numbers,
time, ...) - but I assume you got my idea.
And - don't be afraid - if you just want to have a normal answering machine or send and receive some fax documents, you can use the default
scripts distributed with CapiSuite. They give you already some nice features - e.g. the answering machine is multi-user ready, supports
automatic fax detection and remote inquiry functions. You'll only need to tell CapiSuite some details like your own number, record an own
announcement and that's it.
So CapiSuite is already equipped for your daily telecommunication needs - but if you don't like to do the things the way I do - just change
it or completely do it on your own. And if you write nice scripts or have changes to my default scripts, I would love to get and perhaps
make them available for all users if you don't mind.
SEE ALSO
capisuite.conf(5), fax.conf(5), answering_machine.conf(5), capisuitefax(1)
AUTHOR
Gernot Hillier <gernot@hillier.de>.
CAPISUITE(8)