About 618,000 results
Open links in new tab
  1. Why can `BASH_SOURCE` be used to obtain the current directory …

    Jul 30, 2020 · I've read that BASH_SOURCE should be populated with the name of the executing script (and it works!). But why does BASH_SOURCE hold the name of the executing script, …

  2. Source vs . why different behaviour? - Unix & Linux Stack Exchange

    source is a shell keyword that is supposed to be used like this: source file where file contains valid shell commands. These shell commands will be executed in the current shell as if typed from …

  3. What is the difference between "." "./" and "source"? [duplicate]

    Sep 27, 2016 · When the script is done, any changes that it made to the environment are discarded. . script The above sources the script. It is as if the commands had been typed in …

  4. What is the difference between '.' and 'source' in shells?

    2 source is there for readability and self-documentation, . exists because it is quick to type. The commands are identical. Perl has long and short versions of many of its control variables for …

  5. What does :source % mean? - Unix & Linux Stack Exchange

    Sep 1, 2018 · When I added a vim plugin, VimAwesome document said that :source %. What does this mean? I'd like to understand % meaning.

  6. How to export variables from a file? - Unix & Linux Stack Exchange

    A dangerous one-liner that doesn't require source: export $(xargs <file) It can't handle comments, frequently used in environment files It can't handle values with whitespace, like in the question …

  7. What is the difference between ~/.profile and ~/.bash_profile?

    Feb 27, 2019 · The original sh sourced .profile on startup. bash will try to source .bash_profile first, but if that doesn't exist, it will source .profile. Note that if bash is started as sh (e.g. /bin/sh …

  8. " sudo: source: command not found" - Unix & Linux Stack Exchange

    May 9, 2015 · 34 source is a shell builtin, so it cannot be executed without the shell. However, by default, sudo do not run shell. From sudo Process model When sudo runs a command, it calls …

  9. What is the purpose of .bashrc and how does it work?

    I found the .bashrc file and I want to know the purpose/function of it. Also how and when is it used?

  10. source my ~/.bash_aliases from a script not in

    Oct 1, 2014 · You have to source the file otherwise the aliases have a very short lifespan: the duration of the invoked shell. I have this in my .bashrc: if [ -f ~/.bash_aliases ]; then . …