File: txttag2fortune.viejo

package info (click to toggle)
fortunes-es 1.24
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,240 kB
  • ctags: 105
  • sloc: ansic: 628; makefile: 198; sh: 153; perl: 40
file content (24 lines) | stat: -rwxr-xr-x 394 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

if [ "X$1" = "X" ]; then
  echo "Falta al menos directorio destino"
  exit 1
fi

test -d $1 || mkdir -p $1

# Solo queremos las de una lnea
FILES=`echo *.txttag`
echo $FILES found
ALLFILES=allfiles
cat $FILES > $ALLFILES

if [ "X$2" = "X" ]; then
  TARGET=$1/eslinux
else
  TARGET=$1/$2
fi

cat $ALLFILES | sed 's/.*$/&/g' | tr '' '\n' | sed 's/^$/%/g' > $TARGET
strfile $TARGET