convertir.sh (334B)
1 #!/bin/sh 2 3 DOS_SRC="src" 4 DOS_DST="dst" 5 DOS_SUF="suf" 6 FORMATS="gemtext html" 7 8 FCH_SRC="$(find "$DOS_SRC" -type f)" 9 10 mkdir -p "$DOS_DST" 11 12 for FOR in $FORMATS 13 do 14 for FCH in $FCH_SRC 15 do 16 SUFFIXE=${FCH##*.} 17 INVARIANT=${FCH#$DOS_SRC/} 18 INVARIANT=${INVARIANT%.*} 19 "$DOS_SUF/$SUFFIXE" -f $FOR "$DOS_DST" "$INVARIANT" < $FCH 20 done 21 done