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
+14-29Lines changed: 14 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,20 @@ By default, ```dexec``` assumes the sources are in the directory from which it i
85
85
$ dexec -C /path/to/sources foo.cpp bar.cpp
86
86
```
87
87
88
+
### Read from STDIN
89
+
90
+
```dexec``` will forward your terminal's STDIN to the executing code. You can redirect from a file or use pipe:
91
+
92
+
```sh
93
+
$ dexec foo.cpp <input.txt
94
+
```
95
+
96
+
```sh
97
+
$ curl http://input | foo.cpp
98
+
```
99
+
100
+
If using keyboard entry, ctrl-d (EOF) will terminate reading from STDIN.
101
+
88
102
### Include files and folders
89
103
90
104
Individual files can be mounted without being passed to the compiler, for example header files in C & C++, or input files for program execution. These can be included in the following way.
@@ -131,35 +145,6 @@ $ dexec foo.c -e cpp
131
145
132
146
This will cause ```dexec``` to attempt to lookup the image for the supplied extension in its map.
133
147
134
-
### Reading from STDIN
135
-
136
-
If no source files are specified, ```dexec``` will read from STDIN. Both manual entry and piping are supported. In both cases ```dexec``` writes the contents of STDIN to a temporary file, executes it and then removes it.
137
-
138
-
```dexec``` requires either the [extension](#override-image-by-file-extension) or [image](#override-image-by-nametag) to be supplied.
139
-
140
-
#### Manual entry
141
-
142
-
Text may be entered until EOF is received (Ctrl-D).
0 commit comments