LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 12-28-2016, 02:36 AM   #1
P.G.Krish
Member
 
Registered: Jun 2016
Distribution: Ubuntu
Posts: 64

Rep: Reputation: Disabled
Question Confusion about shell script variable


Hi Guys,
I read the shell script which is used for deploying the aws, I found the below line. I dont understand why there is two variables (ZONE ,KUBE_AWS_ZONE). assigned for this.


Code:
ZONE=${KUBE_AWS_ZONE:-us-west-2a}

I checked with my local terminal

Code:
ZONE=${KUBE_AWS_ZONE:-us-west-2a}
Code:
echo $ZONE
It returns
Quote:
us-west-2a
Code:
echo $KUBE_AWS_ZONE
It returns nothing

I really dont, what is purpose of the KUBE_AWS_ZONE ?

Do you have any idea?kubernetes. I saw this command
 
Old 12-28-2016, 04:06 AM   #2
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,452

Rep: Reputation: 1061Reputation: 1061Reputation: 1061Reputation: 1061Reputation: 1061Reputation: 1061Reputation: 1061Reputation: 1061
ZONE is set to $KUBE_AWS_ZONE if non-null, otherwise to "us-west-2a".
 
1 members found this post helpful.
Old 12-28-2016, 04:13 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 20,228

Rep: Reputation: 6836Reputation: 6836Reputation: 6836Reputation: 6836Reputation: 6836Reputation: 6836Reputation: 6836Reputation: 6836Reputation: 6836Reputation: 6836Reputation: 6836
you can try to google: http://kubernetes.io/docs/getting-started-guides/aws/ or http://kubernetes.io/docs/admin/multiple-zones/, but if you have no idea what is that kube you need to know only: ZONE=${KUBE_AWS_ZONE:-us-west-2a} means use KUBE_AWS_ZONE if set, otherwise use us-west-2a
 
1 members found this post helpful.
Old 12-28-2016, 04:15 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 6,893
Blog Entries: 3

Rep: Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583Reputation: 3583
And the specific name to look for is parameter expansion. See the first item there on Wooledge's list.
 
1 members found this post helpful.
  


Reply

Tags
shell script, ubuntu 16.04


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Bash Shell Script for Linux on OS X variable confusion wagscat123 Other *NIX 4 06-26-2016 12:48 PM
[SOLVED] $variable in shell script RudraB Programming 4 06-28-2013 04:48 AM
[SOLVED] Confusion on get the first parameter on Shell Script MarcosPauloBR Linux - Newbie 5 03-25-2011 01:25 AM
pass variable from one shell script into another shell script xskycamefalling Programming 9 10-03-2009 01:45 AM
Shell script --cannot assign variable-- ralvez Programming 6 02-24-2006 04:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration