Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8235759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:55:17+00:00 2026-06-07T18:55:17+00:00

#!/bin/bash # . ~/some_env database_name The code looks just like the above, and every

  • 0
#!/bin/bash
#
. ~/some_env database_name

The code looks just like the above, and every time I try to run it in bash I get an error that the file or directory doesn’t exist. If I make the directory it complains that I am using a directory. If I make a file, it complains that “filename is not a function”.

What does this line of code do?
It’s very hard to figure out what the line does because the search string is so short.

Also, I am very new to bash.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T18:55:19+00:00Added an answer on June 7, 2026 at 6:55 pm

    . is shorthand for source, so this command just executes the contents of ~/some_env with parameter database_name. Note that source executes the contents of the named file within the current shell context (i.e. not in a sub-shell) and it does not matter if the named file is not executable. If you don’t have a file named some_env in your home directory or a file named database_name in your current working directory then you will get an error message.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try executed some like this #!/bin/bash ${postid=41930} while ${postid} < 42000; do `node
I have a code like this: #!/usr/bin/env bash test_this(){ export ABC=ABC echo some output
#!/bin/bash if test $# == 4; then echo $*; else echo args-error >&2; fi;
My code #!/bin/bash for (( c=0; c<=1127; c++ )) do id = 9694 +
I've got a script like: #!/bin/bash exec /usr/bin/some_binary > /tmp/my.log 2>&1 Problem is that
Here's my code to display some dialogs. #!/bin/bash output=$(zenity --list --text=Choose action --column= --hide-header
I just wrote this backup script: #!/usr/bin/bash # the number of days to do
I opened Terminal from my MacBook Pro, and try to run some bash script
#!/bin/bash echo 'first line' >foo.xml echo 'second line' >>foo.xml I am a total newbie
#!/bin/bash # module add apps/java/1.6 java -Xmx1024m HelloWorld I need to set -XmxYm where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.