Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-04-2010, 09:35 AM
|
#1
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Rep:
|
Variable Declaration in shell scripts...
Hi all..
We have a file that declares many environmental variables. Out of which I have doubt on few. These variables are declared in UNIX environment. We are planing to migrate them along with applications to Linux.
Code:
export MAILSERVER="%new@hub"
MAIL_USERS="vinay.new"{MAILSERVER}",vijay.new"{MAILSERVER}
Does the above declarations work in Linux ?
The above declarations expands to
Code:
mail vinay.new%new@hub,vijay.new%new@hub
which looks little wierd.
I normally use vinay.linux.com being the mail server
Code:
mail vinay.new@vinay.linux.com,vijay.new@vinay.linux.com
This perfectly works fine
Thanks in advance...
Last edited by vinaytp; 02-04-2010 at 09:36 AM.
|
|
|
02-04-2010, 09:47 AM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,415
|
Quote:
Originally Posted by vinaytp
Hi all..
We have a file that declares many environmental variables. Out of which I have doubt on few. These variables are declared in UNIX environment. We are planing to migrate them along with applications to Linux.
Code:
export MAILSERVER="%new@hub"
MAIL_USERS="vinay.new"{MAILSERVER}",vijay.new"{MAILSERVER}
Does the above declarations work in Linux ?
|
Well, have you TRIED IT?? Also, what language are you writing this in?? Just bash/shell script, or something else?
|
|
|
02-04-2010, 10:04 AM
|
#3
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Original Poster
Rep:
|
Quote:
Originally Posted by TB0ne
Well, have you TRIED IT?? Also, what language are you writing this in?? Just bash/shell script, or something else?
|
It just uses k shell in Unix. SO we are porting all our applications to K shell in Linux..These are just k shell scripts.
Still Analisation phase is going, Not did not got a chance to try. will this work in Linux ?
Can you please suggest...
Thanks...
|
|
|
02-04-2010, 11:14 AM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,415
|
Quote:
Originally Posted by vinaytp
It just uses k shell in Unix. SO we are porting all our applications to K shell in Linux..These are just k shell scripts.
Still Analisation phase is going, Not did not got a chance to try. will this work in Linux ?
Can you please suggest...
|
Yes...I suggest you try it.
ksh should function the same, but the only way to know is to actually do it.
|
|
|
02-04-2010, 11:39 AM
|
#5
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
When you try it you can see what the shell is doing by turning tracing on with set -xv (turn off with set +xv)
|
|
|
All times are GMT -5. The time now is 12:02 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|