prcd.sh 302 B

123456789101112131415
  1. #!/bin/sh
  2. # 'njoy
  3. tmp="/tmp/prcd/"
  4. wget "http://www.papuasia.org/prcd/" -nd -r -np -A txt -P $tmp
  5. for f in $tmp*
  6. do
  7. nf=$(echo $f | cut -d '.' -f 1)
  8. cat $f | tr '\n' '\0' | xargs -0 -L1 -I '$' printf '$\n%%\n' > "$nf"
  9. strfile $nf
  10. done
  11. rm $tmp*.txt
  12. mv $tmp* /usr/share/fortune/
  13. rm -rf $tmp