About 443,000 results
Open links in new tab
  1. 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 of the difference …

  2. 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.

  3. What does $# mean in bash? - Ask Ubuntu

    Jul 25, 2017 · Furthermore, when you use bash -c, behavior is different than if you run an executable shell script, because in the latter case the argument with index 0 is the shell command used to invoke it.

  4. What is the difference between #!/bin/sh and #!/bin/bash?

    May 25, 2012 · A script may specify #!/bin/bash on the first line, meaning that the script should always be run with bash, rather than another shell. /bin/sh is an executable representing the system shell.

  5. 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 activated …

  6. 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 the …

  7. Is bash scripting the same as shell scripting? - Ask Ubuntu

    Nov 30, 2014 · After man bash, some of the most important resources are Greg's wiki, Bash hackers and Steve Parker's recent book on Shell scripting that focuses mainly on Bash and is published by …

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

    Linux Bash Script, Single Command But Multiple Lines? Ask Question Asked 13 years ago Modified 2 years, 7 months ago

  9. Difference between [ [ ]] AND [ ] or ( ( )) AND ( ) in Bash

    Mar 19, 2020 · What is [? [ performs a test. The purpose of [ is to test something (e.g. if some file exists) and to return exit status zero if the test succeeds, non-zero otherwise. [ is a command. [ is a …

  10. How to execute a command within a bash script? - Super User

    It looks confusing at first, but it's pretty simple: bash will just replace variables before executing a command, so typing variable name will cause its content to be executed.