How can I unset perticular enviroment variable's value?? - ubuntu-14.04

I have
PATH environment variables's value as:
/home/vinayak/google-cloud-sdk/bin:/home/vinayak/google-cloud-sdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
I wish to delete only these values:
/home/vinayak/google-cloud-sdk/bin:/home/vinayak/google-cloud-sdk/bin/
How can unset only these two values? Please help.
Thanks in Advance.

Related

How to modify default variable values in planet scale?

I need to increase innodb_lock_wait_timeout in planetscale DB, but this command doesn't help:
set global innodb_lock_wait_timeout=600;
It still shows default value.

postman environment variables not working?

Not getting data with environment variable but when putting with hardcoded url: http://localhost:3000/api/v1/store it be getting data:
Get data with hardcoded url
What something went wrong ? please advise
At the end of your environment variables, you have an "/" who don't have to be here, if you concat it, it give you http://localhost:3000**//**api/v1/store

How to change default date_format in MemSQL 4.0

Is there a way to change the default date_format in MemSQL - I'd like to change it to "%m/%d/%Y" instead of the default "%Y-%m-%d", so that i can load data in that format from csv files.
I got error message when try to set it.
mysql> SET ##GLOBAL.date_format = '%m/%d/%Y';
ERROR 1238 (HY000): Variable 'date_format' is a read only variable
Appreciate for any help.
Unfortunately MemSQL follows MySQL for a lot of system variables and as you can see in their docs the default date_format variable is unused: http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_date_format
Furthermore, currently MemSQL does not support transforming a particular column during a load.
Keep an eye out to some awesome solutions to this and other similar problems in our next release.

How to add and use variables in shell dynamically

For example, I have a file look as follows:
abc
def
ghi
Now, I want to use a Linux shell script to set some variables according to this file. I need the following variables to be set something like:
export abc=abc111
export def=def111
export ghi=ghi111
As you can see that the variable names are retrieved from list file as well. Thanks.
while read var; do
export $var=${var}111
done < vars.txt

Part of name of a variable to be a variable

Let's suppose I have following two variables:
arg1=5
count5="test"
Now, I want to able to do something like:
echo ${'count' . $arg1} #which should give me "test" but its returning bad-substitution error
i.e. can part of a variable can be set as variable in bash?
Okay, got it working via indirect variable reference introduced in Bash v2 as:
my_var="count$arg1"
echo ${!my_var}

Resources