Reading Variables From another file

Discussion of programming on Linux, including shell scripting, perl, python, c/c++, mono, java. Whatever tickles your fancy.
sameer666
Naik
Posts: 82
Joined: Tue Nov 06, 2007 5:31 am

Postby sameer666 » Fri Nov 09, 2007 5:38 pm

Novice at heart

mudasir
Captain
Posts: 565
Joined: Tue Oct 17, 2006 5:23 am
Location: Dubai
Contact:

Postby mudasir » Fri Nov 09, 2007 5:47 pm

AOA,

Sameer bhai i can not test it right now...light chali gaye [:d]
As soon as electricity comes back i will try....
by the way sameer bhai the following code is printing the values of the variables

echo | awk '

{

print substr ("'"$line"'",7,20)

}'

i dont want it to print the values...
I am very sorry i might be irritating you, sorry...
Kind Regards
Mudasir Mirza (RHCE)
(+971)55-1045754
http://www.crystalnetworks.org
http://www.diglinux.com

sameer666
Naik
Posts: 82
Joined: Tue Nov 06, 2007 5:31 am

Postby sameer666 » Fri Nov 09, 2007 5:55 pm

hey

you can modify the code to suit your needs, it is just to show u howto.

just remember to

1) export variable
2) call new bash
3) variable should have some value set, or u will not have any environmental variable.

the new bash invoked will have a environmental variable set to wat ever value u set it to.
Novice at heart

mudasir
Captain
Posts: 565
Joined: Tue Oct 17, 2006 5:23 am
Location: Dubai
Contact:

Postby mudasir » Fri Nov 09, 2007 6:21 pm

Kind Regards
Mudasir Mirza (RHCE)
(+971)55-1045754
http://www.crystalnetworks.org
http://www.diglinux.com


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest