Just a quick question. If I have a script that calls another script while running, is it possible for the second script to reference a variable in the first script and if so, how. Is it scriptname.sh:$VARIABLE for a global variable and can you do scriptname.sh:function $VARIABLE or am I off my... (1 Reply)
Hi All,
I have declared a variable in script1 and assign a value for it. In script2 i'll call script1 and then I want the value of variables set in script1.
I have tried with export, but in vain.
How can I achive this?
Below is the two scripts.
--script1
#!/usr/bin/ksh
echo $1... (1 Reply)
Hey all,
I'm wondering how you pass variable's that are defined in one script to another script that's been called by that first script.....
Best regards,
Jaz (1 Reply)
My awk script searches for specified patterns in a text file and stores these values into mem variables.
Once this is done I want to Insert these values into a table.
How can I avail of the variable values outside the scope of awk script....
One method that I have tried is to write the... (7 Replies)
Heres an example.....
<~/abc>$ cat textfile
line 1
line 2
line 3
line 4
line 5
<~/abc>$ cat try.sh
#/bin/ksh
for runs in 1 2 3
do
A=$runs
echo "Inside A : $A"
done
echo "Outside A : $A" <- works fine (1 Reply)
I call my script with two parameters
myscript.sh aaa bbb
What is the way to access $1 and $2 values inside a function? I call the function like this
myfuntion $1 $1
but inside of the function, $1 and $2 are empty. Any suggestions? thank you in advanced. (1 Reply)
Hi ,
I'm trying to change the variable value in a while loop , however its not working it seems that the problem with subshells while reading the file.
#!/bin/sh
FLAG=0;
cat filename | while read data
do
FLAG=1;
done
echo $FLAG
Should display 1 instead displays 0 (13 Replies)
If I set a variable within a while-read loop, sometimes it's local to the loop, sometimes it's global, depending on how the loop is set up. I'm testing this on a Debian Lenny system using both bash and dash with the same results.
For example:
# Pipe command into while-read loop
count=
ls -1... (2 Replies)
Hi All,
i have written below script, and out put i am looking for both variable PRIMARY_CONF and $STANDBY_CONF but i am getting below error
d1.sh: line 64:
------------------------------
line 64 is:
if -a ; then
----------------------------------
please let me know where is the... (9 Replies)
Discussion started by: amar1208
9 Replies
LEARN ABOUT DEBIAN
ircd-ratbox
IRCD-RATBOX(8) System Administration Commands IRCD-RATBOX(8)NAME
ircd-ratbox - Advanced, stable and fast ircd
SYNOPSIS
ircd-ratbox [-help | -version]
ircd-ratbox [-basedir BASEDIR] [-configfile CONFFILE] [-logfile LOGFILE] [-pidfile PIDFILE] [-foreground] [-conftest]
DESCRIPTION
ircd-ratbox is the main ircd daemon responsible for running the IRC server. It delegates specific tasks to several other daemons: resolver,
ssld, bandb.
OPTIONS -help
Show summary of options.
-version
Display version information.
-basedir BASEDIR
Before starting the server, enter BASEDIR directory (chdir).
-configfile CONFFILE
Set configuration file (defaults to /etc/ircd-ratbox/ircd.conf).
-logfile LOGFILE
Set main log path (defaults to /var/log/ircd-ratbox/ircd.log).
-pidfile PIDFILE
Set file used to store main daemon PID (defaults to /etc/ircd-ratbox/ircd.pid).
-foreground
Don't detach process in the background.
-conftest
Check configuration and exit.
AUTHOR
Marc `Duck` Dequenes <Duck@DuckCorp.org>
Original author.
COPYRIGHT
Copyright (C) 2011 Marc Dequenes (Duck)
This manual page was written for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify
this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License version 3 can be found in /usr/share/common-licenses/GPL-3.
ircd ratbox 2011-11-07 IRCD-RATBOX(8)