aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/versions
diff options
context:
space:
mode:
authorGravatar laszlocsomor <laszlocsomor@google.com>2017-04-03 13:09:47 +0000
committerGravatar Marcel Hlopko <hlopko@google.com>2017-04-04 10:06:36 +0200
commit79251005cdb44781703e498045453efa1b1623a5 (patch)
tree712001fb9c3b629154b6a5235ba5df78b6290701 /site/versions
parent13b0daaee2d2979f7fbbddd5fb054462944c0536 (diff)
Remove leading '$' from docs that are interfering with copy/paste
Fixes: https://github.com/bazelbuild/bazel/issues/2399 Change-Id: I21d00430cdf7ece72f532a1cb1be94e9b07a0114 PiperOrigin-RevId: 152001779
Diffstat (limited to 'site/versions')
-rw-r--r--site/versions/master/docs/getting-started.md2
-rw-r--r--site/versions/master/docs/install-os-x.md22
-rw-r--r--site/versions/master/docs/install-ubuntu.md26
-rw-r--r--site/versions/master/docs/query.html18
-rw-r--r--site/versions/master/docs/skylark/macros.md5
-rw-r--r--site/versions/master/docs/tutorial/android-app.md10
-rw-r--r--site/versions/master/docs/tutorial/backend-server.md14
-rw-r--r--site/versions/master/docs/tutorial/cpp.md61
-rw-r--r--site/versions/master/docs/tutorial/environment.md4
-rw-r--r--site/versions/master/docs/tutorial/ios-app.md8
-rw-r--r--site/versions/master/docs/tutorial/java.md69
-rw-r--r--site/versions/master/docs/tutorial/workspace.md4
-rw-r--r--site/versions/master/docs/windows.md20
13 files changed, 175 insertions, 88 deletions
diff --git a/site/versions/master/docs/getting-started.md b/site/versions/master/docs/getting-started.md
index 3f39f43e9f..5c88c69824 100644
--- a/site/versions/master/docs/getting-started.md
+++ b/site/versions/master/docs/getting-started.md
@@ -23,7 +23,7 @@ The `WORKSPACE` file can be used to reference
One workspace can be shared among multiple projects if desired.
```bash
-$ touch WORKSPACE
+touch WORKSPACE
```
## Creating a Build File
diff --git a/site/versions/master/docs/install-os-x.md b/site/versions/master/docs/install-os-x.md
index 32fff7d5fa..a41a00f458 100644
--- a/site/versions/master/docs/install-os-x.md
+++ b/site/versions/master/docs/install-os-x.md
@@ -29,12 +29,16 @@ image with an install wizard.
Installing Homebrew is a one-time setup:
-`$ /usr/bin/ruby -e "$(curl -fsSL
-https://raw.githubusercontent.com/Homebrew/install/master/install)"`
+```bash
+/usr/bin/ruby -e "$(curl -fsSL
+https://raw.githubusercontent.com/Homebrew/install/master/install)"
+```
### 3. Install Bazel Homebrew Package
-`$ brew install bazel`
+```bash
+brew install bazel
+```
You are all set. You can confirm Bazel is installed successfully by running
`bazel version`.
@@ -69,7 +73,7 @@ Once XCode is installed you can trigger signing the license with the following
command:
```
-$ sudo gcc --version
+sudo gcc --version
```
### 3. Download Bazel
@@ -82,8 +86,8 @@ your operating system.
Run the installer:
<pre>
-$ chmod +x bazel-<em>version</em>-installer-<em>os</em>.sh
-$ ./bazel-<em>version</em>-installer-<em>os</em>.sh --user
+chmod +x bazel-&lt;version&gt;-installer-&lt;os&gt;.sh
+./bazel-&lt;version&gt;-installer-&lt;os&gt;.sh --user
</pre>
The `--user` flag installs Bazel to the `$HOME/bin` directory on your system and
@@ -97,10 +101,12 @@ executable is installed in your `$HOME/bin` directory. It's a good idea to add
this directory to your default paths, as follows:
```bash
-$ export PATH="$PATH:$HOME/bin"
+export PATH="$PATH:$HOME/bin"
```
You can also add this command to your `~/.bashrc` file.
You are all set. You can confirm Bazel is installed successfully by running
-`bazel version`.
+```bash
+bazel version
+```
diff --git a/site/versions/master/docs/install-ubuntu.md b/site/versions/master/docs/install-ubuntu.md
index 1c531049b9..c39b6b1425 100644
--- a/site/versions/master/docs/install-ubuntu.md
+++ b/site/versions/master/docs/install-ubuntu.md
@@ -27,8 +27,8 @@ Bazel comes with two completion scripts. After installing Bazel, you can:
### 1. Add Bazel distribution URI as a package source (one time setup)
```
-$ echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
-$ curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
+echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
+curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
```
If you want to use the JDK 7, please replace `jdk1.8` with `jdk1.7` and if you
@@ -36,11 +36,15 @@ want to install the testing version of Bazel, replace `stable` with `testing`.
### 2. Install and update Bazel
-`$ sudo apt-get update && sudo apt-get install bazel`
+```bash
+sudo apt-get update && sudo apt-get install bazel
+```
Once installed, you can upgrade to newer version of Bazel with:
-`$ sudo apt-get upgrade bazel`
+```bash
+sudo apt-get upgrade bazel
+```
## <a name="install-with-installer-ubuntu"></a>Install with installer
@@ -55,13 +59,13 @@ to be installed on the machine to work.
To install OpenJDK 8:
```
-$ sudo apt-get install openjdk-8-jdk
+sudo apt-get install openjdk-8-jdk
```
### 2. Install other required packages
```
-$ sudo apt-get install pkg-config zip g++ zlib1g-dev unzip
+sudo apt-get install pkg-config zip g++ zlib1g-dev unzip
```
### 3. Download Bazel
@@ -73,10 +77,10 @@ your operating system.
Run the installer:
-<pre>
-$ chmod +x bazel-<em>version</em>-installer-<em>os</em>.sh
-$ ./bazel-<em>version</em>-installer-<em>os</em>.sh --user
-</pre>
+```bash
+chmod +x bazel-&lt;version&gt;-installer-&lt;os&gt;.sh
+./bazel-&lt;version&gt;-installer-&lt;os&gt;.sh --user
+```
The `--user` flag installs Bazel to the `$HOME/bin` directory on your system and
sets the `.bazelrc` path to `$HOME/.bazelrc`. Use the `--help` command to see
@@ -89,7 +93,7 @@ executable is installed in your `$HOME/bin` directory. It's a good idea to add
this directory to your default paths, as follows:
```bash
-$ export PATH="$PATH:$HOME/bin"
+export PATH="$PATH:$HOME/bin"
```
You can also add this command to your `~/.bashrc` file.
diff --git a/site/versions/master/docs/query.html b/site/versions/master/docs/query.html
index c3802b4133..dbe80e4846 100644
--- a/site/versions/master/docs/query.html
+++ b/site/versions/master/docs/query.html
@@ -105,7 +105,7 @@ title: Query Language
Note that this quoting is in addition to any quoting that may
be required by your shell. e.g.
</p>
- <pre>% bazel query ' "//foo:bar=wiz" ' # single-quotes for shell, double-quotes for Bazel.</pre>
+ <pre>bazel query ' "//foo:bar=wiz" ' # single-quotes for shell, double-quotes for Bazel.</pre>
<p>
Keywords, when quoted, are treated as ordinary words, thus
@@ -463,8 +463,8 @@ x intersect (y union z)</pre>
further processing. For example:
</p>
<pre>
- % bazel query deps(//my:target) --output=label | grep ... | sed ... | awk ... &gt; foo
- % bazel query "kind(cc_binary, set($(&lt;foo)))"
+ bazel query deps(//my:target) --output=label | grep ... | sed ... | awk ... &gt; foo
+ bazel query "kind(cc_binary, set($(&lt;foo)))"
</pre>
<p>
In the next example, <code>kind(cc_library,
@@ -473,9 +473,9 @@ x intersect (y union z)</pre>
an <code>awk</code> program.
</p>
<pre>
- % bazel query 'deps(//some_dir/foo:main)' --output maxrank |
+ bazel query 'deps(//some_dir/foo:main)' --output maxrank |
awk '($1 &lt; 5) { print $2;} ' &gt; foo
- % bazel query "kind(cc_library, set($(&lt;foo)))"
+ bazel query "kind(cc_library, set($(&lt;foo)))"
</pre>
<p>
In these examples, <code>$(&lt;foo)</code> is a shorthand
@@ -1409,11 +1409,11 @@ maxrank
<p>
<pre>
- $ # Querying over all members of //external returns the repository.
- $ bazel query 'kind(maven_jar, //external:*)'
+ # Querying over all members of //external returns the repository.
+ bazel query 'kind(maven_jar, //external:*)'
//external:other-repo
- $ # ...but the repository is not a dependency.
- $ bazel query 'kind(maven_jar, deps(//foo:bar))'
+ # ...but the repository is not a dependency.
+ bazel query 'kind(maven_jar, deps(//foo:bar))'
INFO: Empty results
</pre>
diff --git a/site/versions/master/docs/skylark/macros.md b/site/versions/master/docs/skylark/macros.md
index ba9c785e36..7782198287 100644
--- a/site/versions/master/docs/skylark/macros.md
+++ b/site/versions/master/docs/skylark/macros.md
@@ -42,7 +42,10 @@ macro), use the constant [PACKAGE_NAME](lib/globals.html#PACKAGE_NAME).
* You may filter the output based on `generator_function` (which function
generated the rules) or `generator_name` (the name attribute of the macro),
- e.g. `$ bazel query --output=build 'attr(generator_function, my_macro, //my/path:all)'`
+ e.g.
+ ```bash
+ $ bazel query --output=build 'attr(generator_function, my_macro, //my/path:all)'
+ ```
* To find out where exactly the rule `foo` is generated in a BUILD file, you
can try the following trick. Insert this line near the top of the BUILD
diff --git a/site/versions/master/docs/tutorial/android-app.md b/site/versions/master/docs/tutorial/android-app.md
index df69e25f8b..f31736b9f9 100644
--- a/site/versions/master/docs/tutorial/android-app.md
+++ b/site/versions/master/docs/tutorial/android-app.md
@@ -139,7 +139,7 @@ project may have many nested packages.
At a command-line prompt, open your new `BUILD` file for editing:
```bash
-$ vi $WORKSPACE/android/BUILD
+vi $WORKSPACE/android/BUILD
```
### Add an android_library rule
@@ -214,13 +214,13 @@ Before you build the sample app, make sure that your current working directory
is inside your Bazel workspace:
```bash
-$ cd $WORKSPACE
+cd $WORKSPACE
```
Now, enter the following to build the sample app:
```bash
-$ bazel build //android:android
+bazel build //android:android
```
The [`build`](/docs/bazel-user-manual.html#build) subcommand instructs Bazel to
@@ -264,7 +264,7 @@ At a command prompt, list the contents of this directory and find the
`android.apk` file:
```bash
-$ ls $WORKSPACE/bazel-bin/android
+ls $WORKSPACE/bazel-bin/android
```
## Run the app
@@ -281,7 +281,7 @@ deployment.
Enter the following:
```bash
-$ bazel mobile-install //android:android
+bazel mobile-install //android:android
```
Note that the `mobile-install` subcommand also supports the
diff --git a/site/versions/master/docs/tutorial/backend-server.md b/site/versions/master/docs/tutorial/backend-server.md
index 5b91b44b2d..00c61ac43d 100644
--- a/site/versions/master/docs/tutorial/backend-server.md
+++ b/site/versions/master/docs/tutorial/backend-server.md
@@ -99,7 +99,7 @@ Android and iOS apps.
Open your new `BUILD` file for editing:
```bash
-$ vi $WORKSPACE/backend/BUILD
+vi $WORKSPACE/backend/BUILD
```
### Add a java_binary rule
@@ -159,13 +159,13 @@ is in the `master` branch of the GitHub repo.
Make sure that your current working directory is inside your Bazel workspace:
```bash
-$ cd $WORKSPACE
+cd $WORKSPACE
```
Now, enter the following to build the sample app:
```bash
-$ bazel build //backend:backend
+bazel build //backend:backend
```
Bazel now launches and builds the sample app. During the build process, its
@@ -196,7 +196,7 @@ run your application on it.
To run the application, enter the following:
```bash
-$ bazel-bin/backend/backend --port=12345
+bazel-bin/backend/backend --port=12345
```
Your application will be available at `http://localhost:12345`
@@ -213,13 +213,13 @@ to perform these actions.
Build the target that allows to deploy to App Engine:
```bash
-$ bazel build --java_toolchain=@io_bazel_rules_appengine//appengine:jdk7 //backend:backend.deploy
+bazel build --java_toolchain=@io_bazel_rules_appengine//appengine:jdk7 //backend:backend.deploy
```
Then, to deploy the application, enter the following:
```bash
-$ $WORKSPACE/bazel-bin/backend/backend.deploy <project-id>
+bazel-bin/backend/backend.deploy <project-id>
```
The deployment script prompts you to authorize access to Google Cloud Platform.
@@ -227,7 +227,7 @@ After you have authorized access the first time, you can deploy the application
using the `bazel` command and the following rule target:
```bash
-$ bazel run //backend:backend.deploy <project-id>
+bazel run //backend:backend.deploy <project-id>
```
Your application URL will be `http://<project-id>.appspot.com`.
diff --git a/site/versions/master/docs/tutorial/cpp.md b/site/versions/master/docs/tutorial/cpp.md
index 3a0f3d1c3f..cd18ce2ea3 100644
--- a/site/versions/master/docs/tutorial/cpp.md
+++ b/site/versions/master/docs/tutorial/cpp.md
@@ -37,10 +37,11 @@ We are going to create a small hello world project with the following directory
Using the following commands to create the necessary source files:
{% highlight bash %}
-$ # If you're not already there, move to your workspace directory.
-$ cd ~/gitroot/my-project
-$ mkdir ./main
-$ cat > main/hello-world.cc <<'EOF'
+# If you're not already there, move to your workspace directory.
+cd ~/gitroot/my-project
+mkdir ./main
+cat > main/hello-world.cc <<'EOF'
+
#include "lib/hello-greet.h"
#include "main/hello-time.h"
#include <iostream>
@@ -56,7 +57,9 @@ int main(int argc, char** argv) {
return 0;
}
EOF
-$ cat > main/hello-time.h <<'EOF'
+
+cat > main/hello-time.h <<'EOF'
+
#ifndef MAIN_HELLO_TIME_H_
#define MAIN_HELLO_TIME_H_
@@ -64,7 +67,9 @@ void print_localtime();
#endif
EOF
-$ cat > main/hello-time.cc <<'EOF'
+
+cat > main/hello-time.cc <<'EOF'
+
#include "main/hello-time.h"
#include <ctime>
#include <iostream>
@@ -74,8 +79,10 @@ void print_localtime() {
std::cout << std::asctime(std::localtime(&result));
}
EOF
-$ mkdir ./lib
-$ cat > lib/hello-greet.h <<'EOF'
+
+mkdir ./lib
+cat > lib/hello-greet.h <<'EOF'
+
#ifndef LIB_HELLO_GREET_H_
#define LIB_HELLO_GREET_H_
@@ -85,7 +92,9 @@ std::string get_greet(const std::string &thing);
#endif
EOF
-$ cat > lib/hello-greet.cc <<'EOF'
+
+cat > lib/hello-greet.cc <<'EOF'
+
#include "lib/hello-greet.h"
#include <string>
@@ -135,15 +144,36 @@ When the target is in other package, a full path from root should be used, like
Now you are ready to build your hello world C++ binary:
{% highlight bash %}
-$ bazel build main:hello-world
+bazel build main:hello-world
+{% endhighlight %}
+
+This produces the following output:
+
+{% highlight bash %}
INFO: Found 1 target...
Target //main:hello-world up-to-date:
bazel-bin/main/hello-world
INFO: Elapsed time: 2.869s, Critical Path: 1.00s
-$ ./bazel-bin/main/hello-world
+{% endhighlight %}
+
+{% highlight bash %}
+./bazel-bin/main/hello-world
+{% endhighlight %}
+
+This produces the following output:
+
+{% highlight bash %}
Hello world
Thu Jun 23 18:51:46 2016
-$ ./bazel-bin/main/hello-world Bazel
+{% endhighlight %}
+
+{% highlight bash %}
+./bazel-bin/main/hello-world Bazel
+{% endhighlight %}
+
+This produces the following output:
+
+{% highlight bash %}
Hello Bazel
Thu Jun 23 18:52:10 2016
{% endhighlight %}
@@ -333,7 +363,12 @@ Note in order to make `hello-greet` visible to `hello-test`, we have to add `"//
Now you can use `bazel test` to run the test.
{% highlight bash %}
-$ bazel test test:hello-test
+bazel test test:hello-test
+{% endhighlight %}
+
+This produces the following output:
+
+{% highlight bash %}
INFO: Found 1 test target...
Target //test:hello-test up-to-date:
bazel-bin/test/hello-test
diff --git a/site/versions/master/docs/tutorial/environment.md b/site/versions/master/docs/tutorial/environment.md
index 74ca13d322..68548dfdfc 100644
--- a/site/versions/master/docs/tutorial/environment.md
+++ b/site/versions/master/docs/tutorial/environment.md
@@ -77,8 +77,8 @@ Enter the following at the command line to get the files in the `source-only`
branch:
```bash
-$ cd $HOME
-$ git clone -b source-only https://github.com/bazelbuild/examples
+cd $HOME
+git clone -b source-only https://github.com/bazelbuild/examples
```
The `git clone` command creates a directory named `$HOME/examples/`. This
diff --git a/site/versions/master/docs/tutorial/ios-app.md b/site/versions/master/docs/tutorial/ios-app.md
index 55d3493509..abf49d27c4 100644
--- a/site/versions/master/docs/tutorial/ios-app.md
+++ b/site/versions/master/docs/tutorial/ios-app.md
@@ -38,7 +38,7 @@ source files to complete this tutorial.
At a command-line prompt, open your new `BUILD` file for editing:
```bash
-$ vi $WORKSPACE/ios-app/BUILD
+vi $WORKSPACE/ios-app/BUILD
```
## Add an objc_library rule
@@ -117,13 +117,13 @@ in the `master` branch of the GitHub repo.
Make sure that your current working directory is inside your Bazel workspace:
```bash
-$ cd $WORKSPACE
+cd $WORKSPACE
```
Now, enter the following to build the sample app:
```bash
-$ bazel build //ios-app:ios-app
+bazel build //ios-app:ios-app
```
Bazel now launches and builds the sample app. During the build process, its
@@ -176,7 +176,7 @@ provisioning profile for all bazel builds:
Now you should be able to build the app for your device:
```bash
-$ bazel build //ios-app:ios-app --ios_multi_cpus=armv7,arm64
+bazel build //ios-app:ios-app --ios_multi_cpus=armv7,arm64
```
This will build the app "fat". If you would prefer just to build for
diff --git a/site/versions/master/docs/tutorial/java.md b/site/versions/master/docs/tutorial/java.md
index 83d23805b4..c1173669dc 100644
--- a/site/versions/master/docs/tutorial/java.md
+++ b/site/versions/master/docs/tutorial/java.md
@@ -24,10 +24,10 @@ Suppose that you have an existing project in a directory, say,
Use the following commands to make a small Java project for this example:
{% highlight bash %}
-$ # If you're not already there, move to your workspace directory.
-$ cd ~/gitroot/my-project
-$ mkdir -p src/main/java/com/example
-$ cat > src/main/java/com/example/ProjectRunner.java <<'EOF'
+# If you're not already there, move to your workspace directory.
+cd ~/gitroot/my-project
+mkdir -p src/main/java/com/example
+cat > src/main/java/com/example/ProjectRunner.java <<'EOF'
package com.example;
public class ProjectRunner {
@@ -36,7 +36,8 @@ public class ProjectRunner {
}
}
EOF
-$ cat > src/main/java/com/example/Greeting.java <<'EOF'
+
+cat > src/main/java/com/example/Greeting.java <<'EOF'
package com.example;
public class Greeting {
@@ -70,14 +71,27 @@ main method.
Now you are ready to build your Java binary:
{% highlight bash %}
-$ cd ~/gitroot/my-project
-$ bazel build //:my-runner
+cd ~/gitroot/my-project
+bazel build //:my-runner
+{% endhighlight %}
+
+This produces the following output:
+
+{% highlight bash %}
INFO: Found 1 target...
Target //:my-runner up-to-date:
bazel-bin/my-runner.jar
bazel-bin/my-runner
INFO: Elapsed time: 1.021s, Critical Path: 0.83s
-$ bazel-bin/my-runner
+{% endhighlight %}
+
+{% highlight bash %}
+bazel-bin/my-runner
+{% endhighlight %}
+
+This produces the following output:
+
+{% highlight bash %}
Hi!
{% endhighlight %}
@@ -114,7 +128,12 @@ build the `greeter` library first and then build `my-other-runner`. Try building
and running `//:my-other-runner`:
{% highlight bash %}
-$ bazel run //:my-other-runner
+bazel run //:my-other-runner
+{% endhighlight %}
+
+This produces the following output:
+
+{% highlight bash %}
INFO: Found 1 target...
Target //:my-other-runner up-to-date:
bazel-bin/my-other-runner.jar
@@ -137,8 +156,8 @@ can refer to targets defined in other BUILD files using the syntax
file:
{% highlight bash %}
-$ mkdir -p src/main/java/com/example/cmdline
-$ cat > src/main/java/com/example/cmdline/Runner.java <<'EOF'
+mkdir -p src/main/java/com/example/cmdline
+cat > src/main/java/com/example/cmdline/Runner.java <<'EOF'
package com.example.cmdline;
import com.example.Greeting;
@@ -171,7 +190,12 @@ must explicitly allow `runner` to depend on `//:greeter`. As is, if we
build `runner` we'll get a permissions error:
{% highlight bash %}
-$ bazel build //src/main/java/com/example/cmdline:runner
+bazel build //src/main/java/com/example/cmdline:runner
+{% endhighlight %}
+
+This produces the following output:
+
+{% highlight bash %}
ERROR: /home/user/gitroot/my-project/src/main/java/com/example/cmdline/BUILD:2:1:
Target '//:greeter' is not visible from target '//src/main/java/com/example/cmdline:runner'.
Check the visibility declaration of the former target if you think the dependency is legitimate.
@@ -196,7 +220,12 @@ This makes `//:greeter` visible to any rule in the
run the `runner` binary:
{% highlight bash %}
-$ bazel run //src/main/java/com/example/cmdline:runner
+bazel run //src/main/java/com/example/cmdline:runner
+{% endhighlight %}
+
+This produces the following output:
+
+{% highlight bash %}
INFO: Found 1 target...
Target //src/main/java/com/example/cmdline:runner up-to-date:
bazel-bin/src/main/java/com/example/cmdline/runner.jar
@@ -217,7 +246,12 @@ _bazel-bin/src/main/java/com/example/cmdline/runner.jar_, you can see that it
only contains `Runner.class`, not its dependencies (`Greeting.class`):
{% highlight bash %}
-$ jar tf bazel-bin/src/main/java/com/example/cmdline/runner.jar
+jar tf bazel-bin/src/main/java/com/example/cmdline/runner.jar
+{% endhighlight %}
+
+This produces the following output:
+
+{% highlight bash %}
META-INF/
META-INF/MANIFEST.MF
com/
@@ -233,7 +267,12 @@ jar that can be deployed, build `runner_deploy.jar` (or, more generally,
`<target-name>_deploy.jar`):
{% highlight bash %}
-$ bazel build //src/main/java/com/example/cmdline:runner_deploy.jar
+bazel build //src/main/java/com/example/cmdline:runner_deploy.jar
+{% endhighlight %}
+
+This produces the following output:
+
+{% highlight bash %}
INFO: Found 1 target...
Target //src/main/java/com/example/cmdline:runner_deploy.jar up-to-date:
bazel-bin/src/main/java/com/example/cmdline/runner_deploy.jar
diff --git a/site/versions/master/docs/tutorial/workspace.md b/site/versions/master/docs/tutorial/workspace.md
index ff3f6da510..246ab4b667 100644
--- a/site/versions/master/docs/tutorial/workspace.md
+++ b/site/versions/master/docs/tutorial/workspace.md
@@ -25,7 +25,7 @@ For your convenience, set the `$WORKSPACE` environment variable now to refer to
your workspace directory. At the command line, enter:
```bash
-$ export WORKSPACE=$HOME/examples/tutorial
+export WORKSPACE=$HOME/examples/tutorial
```
## Create a WORKSPACE file
@@ -42,7 +42,7 @@ external dependency information.
Enter the following at the command line:
```bash
-$ touch $WORKSPACE/WORKSPACE
+touch $WORKSPACE/WORKSPACE
```
This creates the empty `WORKSPACE` file.
diff --git a/site/versions/master/docs/windows.md b/site/versions/master/docs/windows.md
index 86470f6c9d..2f4fe0b9c4 100644
--- a/site/versions/master/docs/windows.md
+++ b/site/versions/master/docs/windows.md
@@ -118,9 +118,9 @@ toolchain is not default on Windows yet, you should use flag
`--cpu=x64_windows_msvc` to enable it like this:
```bash
-$ bazel build --cpu=x64_windows_msvc examples/cpp:hello-world
-$ ./bazel-bin/examples/cpp/hello-world.exe
-$ bazel run --cpu=x64_windows_msvc examples/cpp:hello-world
+bazel build --cpu=x64_windows_msvc examples/cpp:hello-world
+./bazel-bin/examples/cpp/hello-world.exe
+bazel run --cpu=x64_windows_msvc examples/cpp:hello-world
```
### Build Java
@@ -129,9 +129,9 @@ Building Java targets works well on Windows, no special configuration is needed.
Just try:
```bash
-$ bazel build examples/java-native/src/main/java/com/example/myproject:hello-world
-$ ./bazel-bin/examples/java-native/src/main/java/com/example/myproject/hello-world
-$ bazel run examples/java-native/src/main/java/com/example/myproject:hello-world
+bazel build examples/java-native/src/main/java/com/example/myproject:hello-world
+./bazel-bin/examples/java-native/src/main/java/com/example/myproject/hello-world
+bazel run examples/java-native/src/main/java/com/example/myproject:hello-world
```
### Build Python
@@ -141,8 +141,8 @@ On Windows, we build a self-extracting zip file for executable python targets, y
See more details in this [design doc](/designs/2016/09/05/build-python-on-windows.html).
```bash
-$ bazel build examples/py_native:bin
-$ ./bazel-bin/examples/py_native/bin
-$ python ./bazel-bin/examples/py_native/bin # This works in both msys and cmd.exe
-$ bazel run examples/py_native:bin
+bazel build examples/py_native:bin
+./bazel-bin/examples/py_native/bin
+python ./bazel-bin/examples/py_native/bin # This works in both msys and cmd.exe
+bazel run examples/py_native:bin
```