You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -145,7 +145,14 @@ Instead of `main.csx` which is the default, we now have a file named `custom.csx
145
145
146
146
### Running scripts
147
147
148
-
Scripts can be executed directly from the shell as if they were executables.
148
+
You can execute your script using **dotnet script** or **dotnet-script**.
149
+
150
+
```bash
151
+
dotnet script foo.csx
152
+
dotnet-script foo.csx
153
+
```
154
+
155
+
On OSX/Linux, scripts can be executed directly from a shell as if they were executables.
149
156
150
157
```bash
151
158
foo.csx arg1 arg2 arg3
@@ -164,7 +171,9 @@ The OSX/Linux shebang directive should be **#!/usr/bin/env dotnet-script**
164
171
Console.WriteLine("Hello world");
165
172
```
166
173
167
-
You can execute your script using **dotnet script** or **dotnet-script**, which allows you to pass arguments to control your script execution more.
174
+
On Windows, you can run **dotnet register script** to achieve a similar behaviour. This register dotnet-script in the Windows registry as the tool to process .csx files.
175
+
176
+
You can pass arguments to control your script execution more.
0 commit comments