06-10-2008
Thanks Penchal.It is working
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm having an issue when I export within my program. I'm getting the variable name, not the variable value. I have a configuration file (config.txt) that has the values of the variables set as so:
set -a
export ARCHIVEPOSourceDir="/interfaces/po/log /interfaces/po/data"
export... (2 Replies)
Discussion started by: ParNone
2 Replies
2. Shell Programming and Scripting
Hi Guys,
I am using the korn shell. I have an environments files where I have defined a variable
export START_TIME=060000
export END_TIME=220000
I source this environments file into one of my scripts.
The problem is that when I try to use this variable, I cannot get to use this variable as a... (2 Replies)
Discussion started by: zeus101
2 Replies
3. Shell Programming and Scripting
simple question:
for example if i use:
export http_proxy=proxy:8080
and i have this script:
while true; do
....
lynx Google
;;
wget The UNIX and Linux Forums - Learn UNIX and Linux from Experts
;;
...
esac
done
So i must "export http_proxy=proxy:8080" before any lynx and wget... (4 Replies)
Discussion started by: aspire
4 Replies
4. Shell Programming and Scripting
Greeting to all of you!
I've small issue related to the variable which we are setting and exporting through scripts, in one of the script there are some variable used but I am not abel to get the detail as where they are set. I tried finding the detail with the help of env but no luck.
... (2 Replies)
Discussion started by: kumarmani
2 Replies
5. Shell Programming and Scripting
Hi
I have a pass a variable from one script to another.
Here are my scripts
Script #1 ./profile
#!/bin/sh
export NAME="Hello"
Script #2 ./test
#!/bin/sh
./profile
echo $NAME
when I run ./test .. i am not getting anything .. why is that? (5 Replies)
Discussion started by: arex876
5 Replies
6. Shell Programming and Scripting
Hi, Unix Gurus,
I have a problem need help. I have a script to generate environment variable code same as following:
oracle_sid=abcd
export oracle_sid
when I execute this code with command ./script_nane it succeeded.
when I try to find it with env command or echo $oracle_sid, it does not show... (5 Replies)
Discussion started by: ken002
5 Replies
7. Shell Programming and Scripting
Hello Guys,
I need you help to do one task
I have script which is actually doing to fetch the code of any repository in svn
for e.g.:- I can use svn to checkout the repository but I want to checkout the repository for particular tag
like svn co <url>/svn/repo/<tag-name>
and this... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies
8. Shell Programming and Scripting
I have a requirement to change user inside a shell script and execute group of commands. I have done it many times earlier but never came across the issue with exporting variables. Strangely if a var is exported afetr su, it is not working where as if it is does outside su, it works. Another issue... (8 Replies)
Discussion started by: sasiharitha
8 Replies
9. Shell Programming and Scripting
I am relatively new to exporting variables, and I just can't seem to make this count work. What I have is the following:
TOTAL=$($IMAGELIST -backupid $IM -U |gawk '{print $5}' |tail -1)|gawk '{print $6}'
RESTORED=$($BPDBJOBS -most_columns -jobid $JOBS |cut -f15 -d,) |gawk '{print $6}'
export... (7 Replies)
Discussion started by: newbie2010
7 Replies
10. UNIX for Advanced & Expert Users
Hi,
Please find my code below.
ps -xef | grep 14766 | awk 'BEGIN{X="java_home=";X="weblogic_home="}
{for(i=1;i<=NF;i++){if($i ~ /-Dplatform\.home|java$/){split($i,P,"=");s=P?P:$i;print X""s}}}'
echo "java_home="$java_home
echo "weblogic_home="$weblogic_home
Output:
Why does... (3 Replies)
Discussion started by: mohtashims
3 Replies
sh(1) General Commands Manual sh(1)
NAME
sh - Shell, the standard command language interpreter
DESCRIPTION
[Tru64 UNIX] Tru64 UNIX provides two command interpreters with the name sh. The XCU5.0 and POSIX.2 compliant command interpreter sh is
available in the file /usr/bin/posix/sh and is described in the sh(1p) reference page. The Bourne shell, historically known as sh, is
available in the file /usr/bin/sh and is described in the sh(1b) reference page.
[Tru64 UNIX] Your initial, or login, shell is determined by your entry in the file /etc/passwd. This file can be changed only by your sys-
tem administrator. You must use whatever procedures are in place at your location to have this entry changed.
[Tru64 UNIX] If available on your system, you may use the passwd -s or the chsh commands to change your login shell.
Note
This option is not available if your site manages passwords through the Network Information Service (NIS) facility. Check with your system
administrator.
[Tru64 UNIX] Subsequent shells spawned from the initial shell depend on the value in the environment variable BIN_SH. If this variable is
set to xpg4, the POSIX shell is started. If this variable is set to svr4, an SVR4 compliant version of the shell is started. If this vari-
able is unset, the Bourne shell is started. If this variable is set to any other value, an error is reported and the results are unpre-
dictable. See the EXAMPLES section for information on setting this variable.
NOTES
[Tru64 UNIX] With Tru64 UNIX Version 4.0 the Korn shell, /usr/bin/ksh is the same as the POSIX shell /usr/bin/posix/sh.
RESTRICTIONS
[Tru64 UNIX] The file /etc/shells must include entries for both the POSIX shell /usr/bin/posix/sh and the Bourne shell, /usr/bin/sh. If
this file is incorrect, see your system administrator.
EXAMPLES
Using the Bourne, Korn, or POSIX shell, to set the variable BIN_SH to use the POSIX/ XCU5.0compliant shell, enter: BIN_SH=xpg4 export
BIN_SH Using the Bourne, Korn, or POSIX shell, to set the variable BIN_SH to use the SVR4 compliant shell, enter: BIN_SH=svr4 export BIN_SH
Using the Bourne, Korn, or POSIX shell, to unset the variable BIN_SH, enter: unset BIN_SH Using the C/ shell, to set the variable BIN_SH to
use the POSIX/XCU5.0 compliant shell, enter: setenv BIN_SH xpg4 Using the C/ shell, to set the variable BIN_SH to use the SVR4 compliant
shell, enter: setenv BIN_SH svr4 Using the C/ shell, to unset the variable BIN_SH, enter: unsetenv BIN_SH
FILES
User profile. Contains user information, including the login shell name. Contains the names of available and permitted shells.
SEE ALSO
Commands: csh(1), ksh(1), Bourne shell sh(1b), POSIX shell sh(1p), passwd(1)
Files: passwd(4), shells(4)
Standards: standards(5)
sh(1)