Skip to content

Commit 43c5728

Browse files
committed
feat: ✨ Add example of creeating a directory listing file
1 parent b644c6f commit 43c5728

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

75_just/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
out

75_just/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ just -f ./import.justfile docker-build
117117

118118
```sh
119119
just -f loops.justfile counter
120+
121+
just -f loops.justfile directory-listing
120122
```
121123

122124
## Resources

75_just/loops.justfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,12 @@ counter:
1212
for file in *; do
1313
echo "$file -> ${counter}"
1414
counter=$((counter + 1))
15-
done
15+
done
16+
17+
directory-listing:
18+
#!/usr/bin/env bash
19+
mkdir -p ./out || true
20+
set -euo pipefail
21+
for file in ./*; do
22+
echo "file '${file}'"
23+
done > ./out/out.txt

0 commit comments

Comments
 (0)