About 448,000 results
Open links in new tab
  1. How to increment a variable in bash? - Ask Ubuntu

    Jan 30, 2017 · I found that on Bash 3.2.57, using declare -i x and then doing x+=1 in a loop (doing other thing), x did not increment more than one time. The let and (()) methods worked fine.

  2. bash - How do I add environment variables? - Ask Ubuntu

    Aug 27, 2011 · To set an environment variable from a script, use the export command in the script, and then source the script. If you execute the script it will not work. For an explanation …

  3. Linux Bash Script, Single Command But Multiple Lines?

    Linux Bash Script, Single Command But Multiple Lines? Ask Question Asked 12 years, 11 months ago Modified 2 years, 6 months ago

  4. How to activate python virtualenv through shell script?

    Apr 30, 2020 · The same thing I am trying to achieve I have to run this command source .venv/bin/activate through a bash script which is not running, as I need the env should get …

  5. BASH script to set environment variables not working

    Your command-line environment is the parent of the script's shell, so it does not see the variable assignment. You can use the . (or source) bash command to execute the script commands in …

  6. Run part of a bash script as a different user

    Nov 28, 2023 · I am in Ubuntu 9.04. Is there a way to make part of a script run as a different (non-root) user? If it helps, the part to be run as a different user occurs at the end of the script.

  7. bash - How to run an alias in a shell script? - Ask Ubuntu

    Sourcing a script with the . or source buiiltin causes the current shell to execute all the commands in it. If alias expansion would occur in the shell in which . or source is run, it occurs.

  8. sh - How to use source command in shell script? - Super User

    If you want this sourcing of the tensorflow activate script to happen every time you open a new shell, you need to edit ~/.bashrc or ~/.profile (or other files, depending on what your shell is …

  9. How to make a file (e.g. a .sh script) executable, so it can be run ...

    Dec 16, 2012 · The bash command is actually store as /bin/bash and it is an executable on all Ubuntu systems. Creating a file of commands saves you from adding the shebang #!/bin/bash …

  10. What is the meaning of exit 0, exit 1, and exit 2 in a bash script?

    Mar 14, 2017 · A bash script is like a movie theater, there are different exists. The exit statements mark the location of the exits for the bash interpreter. When the script is fired, the interpreter is …