Use the %ENV hash to access environment variables. Environment variables will not normally become Perl variables (unless you write some code to do so) magically. But note that, because perl is executed as a process, you cannot change the corresponding environment variable in the shell from Perl, because what you will get from Perl is just a copy:
I hope I am posting this in the right section.
I have c file that is using the motif GUI toolkit to draw widgets and things of that sort. I also have another program that runs with xnest. I need to figure out a way to place that xnest program in my c code so that it exists in the window that the... (4 Replies)
Hi Guys,
could someone tell me what this ksh construct does
typeset -r PROG_PWD=${0%/*} does
I understand the -r for readonly but I would very much appreciate a definitive account of what this will set $PROG_PWD to.
If I run this at the cmd line it it gets set to /usr/bin but I would... (2 Replies)
Hi
I am trying to run a script centrally that will go out and set the network management ip address on all my Sun boxes running Solaris. We have decided that the network management address will be the boxes main IP address but the first octet as a 172 rather than a 10, so for example ifconfig -a... (2 Replies)
Hello.
I found a Unix script on this site that calculates a date that is 2 months earlier from today. I'm using that script and writing the value to a file called 2monthsago.txt. I want to use that value in another script. Below is my attempt at doing that and the results.
My Script:
... (1 Reply)
I am trying to use one global declaration --> "exec 2>$ERR" to capture all stderr outputs that may occur anywhere in my script.
Then close it at the end of the script using --> "exec 2<&-"
I am using KSH on Solaris 8.
KSH Version M-11/16/88i
If I comment two "exec .." statements in the... (11 Replies)
My webpage is hosted from perlscript(homepage.pl), i want to add piece of html code in the footer of the homepage. I simply pasted the html code at the end of the perl script as below...
========================================================
close(OUTSQL);
... (4 Replies)
Hi,
I am working on a parsing script but cannot figure out how to accomplish this. Here is a simplified version of the script:
#!/bin/bash
DS=$1
DS=`expr $DS \* 2`
DS=`expr $DS + 7`
cat $FILENAME | awk '/<row><v> +/' | awk '{printf("%.0f %.0f\n", $6, $9)}'
The problem is that I want the... (2 Replies)
Hi
Its been a long time since I worked with ssh keys containing embedded shell commands and cannot remember how it is done.
Does anyone know of any sites that have a good tutorial on the subject? I'm not having much luck searching Google for it.
Incidentally, searching this forum for the... (6 Replies)
Hi All,
I am aware that html tags can be embedded in cgi script as below.. In the same way is it possible to embed the below javascript in perl cgi script ??
print("<form action="action.htm" method="post" onSubmit="return submitForm(this.Submitbutton)">");
print("<input type = "text"... (1 Reply)
Ive been trying to move to Perl. It has been a struggle.
My question is, is there a good resource that explains nesting statements.
As an example.
To change
primary
Factory CTS 1.9.0(46) P1
*Slot 1 CTS 1.10.2(42) P1
To
primary *Slot 1 CTS 1.10.2(42) P1
... (5 Replies)
Discussion started by: popeye
5 Replies
LEARN ABOUT SUNOS
asadmin-export
asadmin-export(1AS) User Commands asadmin-export(1AS)NAME
asadmin-export, export - marks a variable name for automatic export to the environment of subsequent commands in multimode
SYNOPSIS
export [ name=value [ name=value]*]
Marks a variable name for automatic export to the environment of subsequent commands. All subsequent commands use the variable name values
as specified; unless you unset them or exit multimode. If only the variable name is specified, the current value of that variable name is
displayed. If the export command is used without any arguments, a list of all the exported variables and their values is displayed.
Exported shell environment variables set prior to invoking the asadmin utility are imported automatically and set as exported variables
within asadmin. Unexported environment variables cannot be read by the asadmin utility.
OPERANDS
name=value variable name and value for automatic export to the environment to be used by subsequent commands.
Example 1: Using export to list the environment variables
asadmin> export AS_ADMIN_HOST=bluestar AS_ADMIN_PORT=8000 AS_ADMIN_USER=admin AS_ADMIN_PASSWORD=password
asadmin> export AS_ADMIN_PREFIX=server1.jms-service
asadmin> export //to list the environment variables that are set
AS_ADMIN_HOST=bluestar
AS_ADMIN_PORT=8000
AS_ADMIN_USER=admin
AS_ADMIN_PASSWORD=********
AS_ADMIN_PREFIX=server1.jms-service
Where: the export command lists the environment variables that are set. In this case, the environment variables have been set to: the host
is bluestar, the port is 8000, the administrator user is admin with an associated password, and the prefix is server1.jms-service.
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-unset(1AS), asadmin-multimode(1AS)J2EE 1.4 SDK March 2004 asadmin-export(1AS)