Introduction
Introduction Statistics Contact Development Disclaimer Help
dir2meme: write output memefile to stdout - brcon2023-hackathons - Bitreichcon …
git clone git://bitreich.org/brcon2023-hackathons git://enlrupgkhuxnvlhsf6lc3fz…
Log
Files
Refs
Tags
---
commit 514dc27e1f5c92be7292bd87a106b79f69fd026f
parent a2643dd5de50886880e69db83c40e8dea9263744
Author: Anders Damsgaard <[email protected]>
Date: Sat, 12 Aug 2023 18:07:33 +0200
dir2meme: write output memefile to stdout
Signed-off-by: Christoph Lohmann <[email protected]>
Diffstat:
M memes/dir2meme | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/memes/dir2meme b/memes/dir2meme
@@ -1,15 +1,12 @@
#!/bin/sh
-if [ $# -lt 1 ];
+if [ $# -ne 0 ];
then
- printf "usage: %s file.meme\n" "$(basename "$0")" >&2
+ printf "usage: %s\n" "$(basename "$0")" >&2
exit 1
fi
-memefile="$1"
-outname="${memefile%.*}"
-
-printf "meme\n" > ${memefile}
+printf "meme\n"
find . -type f \
| while read -r medianame;
do
@@ -21,8 +18,7 @@ do
filename="$(basename "${medianame}")"
memetag="${filename%.*}"
- printf "#%s %s\n" "${memetag}" "${filename}" >> "${memefile}"
+ printf "#%s %s\n" "${memetag}" "${filename}"
done
-printf "%s\n" "${memefile}"
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.