Skip to content

Commit a15d1f3

Browse files
Alistair Turnbullrrthomas
authored andcommitted
Cookbook.nancy.md: Add an example of $realpath
1 parent 6b2fe21 commit a15d1f3

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Cookbook.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,11 @@ Assuming it is called `make-zip.in.sh`, it can be used thus, from a file called
229229
```
230230
$run(make-zip.in.sh,\$outputpath)
231231
```
232+
233+
## Processing files in the input directory
234+
235+
Sometimes we would like to process input files using a command other than `nancy`. For example, a file can display its own modification date using `$realpath` like this:
236+
237+
```
238+
$run(date,-d,@$run(stat,-c%Y,$realpath),+%F)
239+
```

Cookbook.nancy.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,11 @@ Assuming it is called `make-zip.in.sh`, it can be used thus, from a file called
126126
```
127127
\$run(make-zip.in.sh,\$outputpath)
128128
```
129+
130+
## Processing files in the input directory
131+
132+
Sometimes we would like to process input files using a command other than `nancy`. For example, a file can display its own modification date using `\$realpath` like this:
133+
134+
```
135+
\$run(date,-d,@$run(stat,-c%Y,$realpath),+%F)
136+
```

0 commit comments

Comments
 (0)