LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-26-2017, 06:30 AM   #1
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Rep: Reputation: 61
bash source environment file with nopass


Trying to understand something in a bash script. The author was sourcing a file of environment variables, but added "nopass" to the command line:
Code:
source /conf/file.env nopass
I've been searching the man pages and the Internet, but can't find any reference to "nopass." Anyone have an idea what that is doing?
 
Old 06-26-2017, 06:57 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,629

Rep: Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265
yes, you need to check that /conf/file.env about that
 
Old 06-26-2017, 07:14 AM   #3
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Original Poster
Rep: Reputation: 61
There is nothing in the file related to "nopass." It is a OpenStack keystonerc file. It just has things like:
Code:
export OS_AUTH_SYSTEM=...
export OS_AUTH_URL=...
export OS_TENANT_ID=...
That character sequence doesn't show up at all.
 
Old 06-26-2017, 07:20 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,629

Rep: Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265
yes, because nopass is an argument, a positional parameter (especially $1)
 
1 members found this post helpful.
Old 06-26-2017, 07:52 AM   #5
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Original Poster
Rep: Reputation: 61
Ah! Looked closer in the file. It is testing if "nopass" is passed in. If so, it does some extra steps. I thought he was just picking up the export statements. So, I just grepped for "export" from the file and didn't see the whole thing. Duh! Thanks so much!
 
Old 06-26-2017, 08:12 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,629

Rep: Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265
you are welcome
 
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which file in bash source code (tarball) contain a print output function Runicer Programming 2 03-20-2012 08:47 AM
Non-standard file system, environment variables and bash script wael_h Slackware 3 03-12-2012 11:52 AM
Bash script to fgrep a large file. With list as source for searching. the_file Linux - Newbie 14 01-24-2011 03:42 PM
reload source file on bash script noisebleed Linux - General 7 05-01-2007 03:25 AM
source an environment file in Makefile sharathkv Programming 3 04-05-2007 10:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:15 PM.

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