11-24-2009
Here is a hint
You'll need a loop with:
$* = all arguments.
$# = number of arguments.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all
i need to pass to my shell script parameter that looks like "2 3 3"
inside the script i need to use this string that looks like this "2 3 3"
but when i try to print the script im getting syntax error , this is my script :
set s = $1
echo $s (1 Reply)
Discussion started by: umen
1 Replies
2. Shell Programming and Scripting
Hi,
I,m writing a program in shell script and currently this script is calling a java program.
I have a problem to pass string variable from my shell script to the java program. I don't know on how to pass it and how the java program can call what I have pass from the shell script.
This is... (3 Replies)
Discussion started by: badbunny9316
3 Replies
3. Shell Programming and Scripting
I have to pass a sentence in a file, the specs are as:
cat run | sed 's/SRT/'$8'/g' | sed 's/plength/68/g' | sed 's/stcol/'$5'/g' | sed 's/encol/'$6'/g' | sed 's/brdtype/'$1'/g' | sed 's/brdtxt/'$3'/g' | sed 's/demotxt/Total '$2'/g' | sed 's/bantxt/ban_'$7'/g' | sed 's/validcodes/'$4'/g' >... (15 Replies)
Discussion started by: patilrakesh1984
15 Replies
4. Shell Programming and Scripting
My shell script generates a bunch of lines of text and passes this text as an argument to a perl script.
I'm able to do this, but for some reason newlines don't get recognized in the perl script and so the script just prints actual '\n' instead of carriage returning, otherwise everything gets... (3 Replies)
Discussion started by: stevensw
3 Replies
5. Shell Programming and Scripting
I need call expect script from shell script and pass values some of which could contain space. How to make expect to treat such values as one variable? (1 Reply)
Discussion started by: urello
1 Replies
6. Shell Programming and Scripting
There's a JavaScript file that I call from command line (there's a framework) like so:
./RunDiag.js param1:'string one here' param2:'string two here'
I have a shell script where I invoke the above command. I can run it in a script as simple as this
#!/bin/bash
stuff="./RunDiag.js... (4 Replies)
Discussion started by: AcerAspirant
4 Replies
7. Shell Programming and Scripting
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies
8. Shell Programming and Scripting
Hello,
I am trying to execute an SQL query from shell script.
A part of script is something like this:
fromDate=`echo $(date +"%F%T") | sed "s/-//g" | sed "s/://g"`
$ORACLE_HOME/sqlplus -s /nolog <<EOD1
connect $COSDBUID/$COSDBPWD@$COSDBSID
spool... (4 Replies)
Discussion started by: sanketpatel.86
4 Replies
9. UNIX for Dummies Questions & Answers
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
10. Shell Programming and Scripting
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
LEARN ABOUT DEBIAN
net::sip::nathelper::server
Net::SIP::NATHelper::Server(3pm) User Contributed Perl Documentation Net::SIP::NATHelper::Server(3pm)
NAME
Net::SIP::NATHelper::Server - server for Net::SIP::NATHelper::Client
DESCRIPTION
This module is a wrapper around Net::SIP::NATHelper::Base and will receive it's instructions from Net::SIP::NATHelper::Client using RPC via
sockets.
CONSTRUCTOR
new ( [ HELPER ], @FDS )
Will create an object which listens on all file descriptors given in FDS for RPC from clients.
If HELPER is given and a Net::SIP::NATHelper::Base object or derived it will be used, otherwise the helper will be created.
METHODS
do_command ( FD )
Called when FD is available for reading. Calls accept on FD and reads the RPC packet from the resulting file descriptor, executes it
and returns result back.
Currently implemented commands are "allocate","activate" and "close" which will map to the local methods allocate_sockets,
activate_session and close_session.
One might redefine or add commands by changing "$self->{commands}". The key of this hash reference is the command name and the value
is the callback.
Unknown commands will be ignored, e.g nothing returned.
loop
This will loop over all file descriptors it gets from callbacks in Net::SIP::NATHelper::Base and the file descriptors for the RPC
sockets.
When file descriptors gets available for reading it will execute the callbacks, e.g. forward the RTP data or call do_command. In
regular intervals it will call expire from Net::SIP::NATHelper::Base to expire the RTP sockets and sessions.
allocate_sockets ( ... )
Calls allocate_sockets of the local Net::SIP::NATHelper::Base object. Takes and returns the same arguments.
activate_session ( ... )
Calls activate_session of the local Net::SIP::NATHelper::Base object. Takes the same arguments and returns 1 if the session was newly
activated, -1 if it was activated before and false if activation failed. Updates callbacks into the event loop.
close_session ( ... )
Calls activate_session of the local Net::SIP::NATHelper::Base object. Takes the same arguments and returns the number of closed
sessions. Updates callbacks into the event loop.
expire ( ... )
Calls expire of the local Net::SIP::NATHelper::Base object. Takes the same arguments and returns the number of expired sessions.
Updates callbacks into the event loop if necessary.
BUGS
The local event loop should be pluggable, so that other implementations could be used. Right now it's a hard coded loop using select.
perl v5.14.2 2009-01-23 Net::SIP::NATHelper::Server(3pm)