add prcd2fortune
This commit is contained in:
parent
c0e5944447
commit
e5571d8b63
1 changed files with 15 additions and 0 deletions
15
prcd2fortune/prcd.sh
Normal file
15
prcd2fortune/prcd.sh
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# 'njoy
|
||||||
|
tmp="/tmp/prcd/"
|
||||||
|
wget "http://www.papuasia.org/prcd/" -nd -r -np -A txt -P $tmp
|
||||||
|
|
||||||
|
for f in $tmp*
|
||||||
|
do
|
||||||
|
nf=$(echo $f | cut -d '.' -f 1)
|
||||||
|
cat $f | tr '\n' '\0' | xargs -0 -L1 -I '$' printf '$\n%%\n' > "$nf"
|
||||||
|
strfile $nf
|
||||||
|
done
|
||||||
|
|
||||||
|
rm $tmp*.txt
|
||||||
|
mv $tmp* /usr/share/fortune/
|
||||||
|
rm -rf $tmp
|
Loading…
Reference in a new issue