10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all
I am trying to create a script that takes a password input then writes that to a tmp file and puts that tmp file path in my env as a var.
It does everything but export the my env and I am unsure why.
I am using Ubuntu 12.4
#!/bin/bash
read -s -p "Enter Password: " gfpassword... (5 Replies)
Discussion started by: koikoi
5 Replies
2. Shell Programming and Scripting
Hi All,
I have script and it's hardcoded the script ca invoke in user home dir and logs will be redirected to home dir of user.
how to make the same script will be invoke from /usr/bin with out chg the logs and other functions path from /user/homedir .
code is below: pls check how to... (1 Reply)
Discussion started by: saku
1 Replies
3. Red Hat
i have a file that i need to edit and replace a single value with another. so i have two variables, $oldvalue and $newvalue but below doesn't work:
ed file.txt << EOF
,s/$oldversion/$newversion/g
wq
EOFi presume it's the $ that is the issue since it's actually special to ed. any suggestions?... (1 Reply)
Discussion started by: crimso
1 Replies
4. Solaris
What is the difference between ${variable} and $variable when used in a script? (2 Replies)
Discussion started by: orange47
2 Replies
5. Solaris
Hi
I'm trying to understand variable scopes in solaris10.
It is said that to display env variables we use 3 commands :
- env
- set
- export
What is the difference between them ?
thx for help.
---------- Post updated at 11:00 AM ---------- Previous update was at 10:50 AM ----------
... (2 Replies)
Discussion started by: presul
2 Replies
6. Shell Programming and Scripting
Hi,
I have two scripts say one.sh and two.sh.
I want one.sh to continuously export a variable in loop. and when two.sh starts then it should read the last value exported from one.sh.
file: one.sh
#! bin/sh
for i in `seq 1 1 4000000`; do
export VAR=$(($i**$i)) ;
done
file two.sh
... (2 Replies)
Discussion started by: bhushan123
2 Replies
7. Shell Programming and Scripting
I have a shell script I want to run that will set environment variables based on the value of an input variable submitted when the shell script is called. For example:
$ mgenv.sh prod
This would set environment variables for prod
$ mgenv.sh test
This would set environment variables... (1 Reply)
Discussion started by: brtaylor73
1 Replies
8. UNIX for Advanced & Expert Users
Hi !
How to export ENV variables, which remains set for all the shell
Example :-
Login :myID
Pwd : **** -> Here my ID .profile is executed. Let say I set MYENV variable
Kisses% rlogin ABC -l XXXGroupID -> I login into a remote Solaris Server ABC
password : **** -> "XXXGroupID's... (1 Reply)
Discussion started by: dashok.83
1 Replies
9. Shell Programming and Scripting
Hi,
I want to get the value of the env varables using the ksh script. All the env variables are stored in a file.
Eg.
file1
$INPATH
$OUTPATH
myscirpt:
for name in `awk { print $1 } file1`
do
cd $name
done
i'm getting the error like $INPATH not found.
in the same script... (1 Reply)
Discussion started by: vij_krr
1 Replies
10. Shell Programming and Scripting
Hi all,
I have seen it in all the .profile files and env file this
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH
What exactly does this Export path does??
Thanks
SUmeet (1 Reply)
Discussion started by: sumeet
1 Replies