|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: S T
Length: 584 (0x248)
Types: TextFile
Names: »Shar_split«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Fortune/Shar_split«
#!/bin/csh -f
@ maxsize=50000
set ls=(`ls -l $1`)
@ numfiles = ($ls[4] + ($maxsize - 1)) / $maxsize
echo " # think we need $numfiles files"
set wc=(`wc $1`)
@ splitsize = ($wc[1] + ($numfiles - 1)) / $numfiles
echo " split -$splitsize $1 $1."
split -$splitsize $1 $1.
@ i = $3
set l=($1.??)
if ($#l != $numfiles) echo " # actually made $#l files"
foreach f ($l)
if ($i < 10) then
set outf=$2.0$i
else
set outf=$2.$i
endif
if ("$5" == "") then
echo " shar $4 $f > $outf"
shar $4 $f > $outf
else
echo " shar $4 $f | $5 > $outf"
shar $4 $f | $5 > $outf
endif
@ i++
end