09-15-2011
Thanks Andrew, as it turns out there is a new to me command scutil taht I can use to grab the localhostname -- scutil --get LocalHostName -- easy enough to pop into the script.
Many thanks for your thoughts & assistance here!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can someone send me a shell script to set all Oracle environment variable which is working.
I have the following script which works but not 100%. Please advice what you think is wrong.
if # Command executed from a terminal
then
ORACLE_SID=""
... (4 Replies)
Discussion started by: uuser
4 Replies
2. Shell Programming and Scripting
Hi,
I'm exporting an environmental variable from a C program using putenv function. I'm calling the exe of the C program from shell script. But when I display the environmental variables from the Shell script, My varaible is not getting displayed.
Can anyone please tell me how to get it in... (2 Replies)
Discussion started by: janemary.a
2 Replies
3. Shell Programming and Scripting
Hi,
I have problem setting up environmental variables.
The idea is to start with main.ksh script that will run setting.ksh, and in side of it I'll set up variables.
Please take a look at my code, and help me to find my mistake.
Thanks,
Mila
Main.ksh look like this:
#!/usr/bin/ksh
#... (2 Replies)
Discussion started by: mefquik
2 Replies
4. UNIX for Dummies Questions & Answers
Hello.
I have a question about how the PATH environment variable works.
I wrote a script in $HOME/bin/gvim.
I want it to be called instead of /usr/bin/gvim,
so I've placed it before in the PATH.
However, it is still the old one that is found.
If I open an other terminal, I have the... (6 Replies)
Discussion started by: qwer
6 Replies
5. Shell Programming and Scripting
Dear Folks,
I am facing an issue in getting a value of a variable.Let me explain the scenario.
I am having a list file say files.list in which I have mentioned
1 FILE1
2 FILE2
Then I am having an set_env.ksh in which I mentioned
FILE1=/clocal/data/user/userdata.txt... (4 Replies)
Discussion started by: dinesh1985
4 Replies
6. Shell Programming and Scripting
I have a request from a programmer to set an env variable for him. I know how to do it for bash shell by adding the following line to .bash_profile
export $VAR=/home/code/project/
But this will be applicable only when he is in his bash shell. What is the procedure to be followed to make... (2 Replies)
Discussion started by: Tuxidow
2 Replies
7. Shell Programming and Scripting
Hi,
I have Sun solaris x64 box in which i need to set a Environment variable for all the users in the box. This Environment varible is used by the application on the box.
Could any one please help me in setting the Environment variable.
Thanks,
Firestar (6 Replies)
Discussion started by: firestar
6 Replies
8. UNIX for Advanced & Expert Users
i want to set environmental variables in solaris and redhat.
it should show the current directory and the default shell should be bourne shell. along with it should show the hostname..
like this
hostname{/home/vipin/data}# ifconfig
Thanks in advanced.:wall:
Please use code tags.... (1 Reply)
Discussion started by: vipinkumarr89
1 Replies
9. Shell Programming and Scripting
i set a variable from the command line:
export GANG="james,roy,martin"
i can access this variable ($GANG) from a script. but each time i run the script, the variable keeps getting bigger. more info keeps getting added to it.
Is there anyway i can make the $GANG variable contain the... (3 Replies)
Discussion started by: SkySmart
3 Replies
10. Shell Programming and Scripting
My shell script it.sh.I am calling bip.sh from it.sh
#!/bin/sh
ORACLE_HOME=/var/opt/oracle/product/10g; export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin:/bin:/usr/bin; export PATH
today=`date "+%m-%d-%Y %H:%M:%S"`; export today
CUR_DIR=$1; export CUR_DIR
LOG_FILE=$CUR_DIR/error.log;... (4 Replies)
Discussion started by: rafa_fed2
4 Replies
irc(n) Low Level Tcl IRC Interface irc(n)
NAME
irc - Create IRC connection and interface.
SYNOPSIS
package require Tcl
package require irc ?0.2?
::irc::connection hostname
::irc::config key value
net registerevent event script
net connect
net user username localhostname userinfo
net nick nick
net ping
net join channel
net part channel
net privmsg target message
net send text
who ?address?
action
target ?index?
msg
DESCRIPTION
This package provides low-level commands to deal with the IRC protocol (Internet Relay Chat) for immediate and interactive multi-cast com-
munication.
::irc::connection hostname
The command creates a new object to deal with an IRC connection. Creating this IRC object does not automatically create the network
connection. It returns a new irc namespace command which can be used to interact with the new IRC connection.
::irc::config key value
Sets configuration key to value. Currently, the only config key defined is the boolean flag debug which, when turned on, makes irc
print more information about what is going on.
Per-connection Commands
In the following list of available connection methods net represents a connection command as returned by ::irc::connection.
net registerevent event script
Registers a callback handler for the specific event. Events available are those described in the IRC RFC: 1459. In addition, there
are several other events defined. defaultcommand adds a command that is called if no other callback is present. EOF is called if
the connection signals an End of File condition. script is executed in the connection namespace, which can take advantage of sev-
eral commands (see Callback Commands below) to aid in the parsing of data.
net connect
This causes the socket to be established. ::irc::connection created the namespace and the commands to be used, but did not actually
open the socket. This is done here.
net user username localhostname userinfo
Sends USER command to server. username is the username you want to appear. localhostname is the name of your server, and userinfo
is a short description of who you are.
net nick nick
NICK command. nick is the nickname you wish to use for the particular connection.
net ping
PING the IRC server.
net join channel
channel is the IRC channel to join. IRC channels typically begin with a hashmark ("#").
net part channel
Makes the client leave channel.
net privmsg target message
Sends message to target, which can be either a channel, or another user, in which case their nick is used.
net send text
Sends text to the IRC server.
Callback Commands
These commands can be used within callbacks
who ?address?
Returns the nick of the user who performed a command. The optional address keyword causes the command to return the user in the
format "username@address".
action Returns the action perfomed, such as KICK, PRIVMSG, MODE, etc... Normally not useful, as callbacks are bound to a particular event.
target ?index?
Returns the target of a particular command, such as the channel or user to whom a PRIVMSG is sent. In the case of multiple targets,
the optional index argument may be used to specify which one to return. The default is 0.
msg Returns the message portion of the command (the part after the :).
SEE ALSO
rfc 1459
KEYWORDS
irc, chat
irc 0.2 irc(n)