Skip to content

Commit 9ae532c

Browse files
Alistair Turnbullrrthomas
authored andcommitted
Cookbook.nancy.md: Add an example of $filename
1 parent 7e390e6 commit 9ae532c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Cookbook.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,3 +237,9 @@ Sometimes we would like to process input files using a command other than `nancy
237237
```
238238
$run(date,-d,@$run(stat,-c%Y,$realpath),+%F)
239239
```
240+
241+
We might want to process a different file. For example, [`timeplate.in.html`](#website-example) could display the modification date of `main.in.html` using `$filename` like this:
242+
243+
```
244+
$run(date,-d,@$run(stat,-c%Y,$filename(main.in.html)),+%F)
245+
```

Cookbook.nancy.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,9 @@ Sometimes we would like to process input files using a command other than `nancy
134134
```
135135
\$run(date,-d,@$run(stat,-c%Y,$realpath),+%F)
136136
```
137+
138+
We might want to process a different file. For example, [`timeplate.in.html`](#website-example) could display the modification date of `main.in.html` using `\$filename` like this:
139+
140+
```
141+
\$run(date,-d,@$run(stat,-c%Y,$filename(main.in.html)),+%F)
142+
```

0 commit comments

Comments
 (0)