Na szybko zrobiłem coś takiego:
#!/bin/bash
counter=$(echo "$((`cat ./test.xls |grep -v ^# |wc -l` +1))/100" |bc)
i=1
while [ "$i" -le $counter ] do
if [ "$i" = 1 ] then
x=2
y=101
head -1 ./test.xls >> out01.xls
sed -n "$x","$y"p test.xls >> out01.xls
elif [ "$i" = 2 ] then
x=102
y=201
head -1 ./test.xls >> out02.xls
sed -n "$x","$y"p test.xls >> out02.xls
else
x=$(($i*100-98))
y=$(($i*100+1))
head -1 ./test.xls >> out0"$i".xls
sed -n "$x","$y"p test.xls >> out0"$i".xls
fi
(( i++ ))
done
TP-LINK TL-WDR3600 @ Openwrt - 300/20Mbps
HP ProLiant DL360e Gen8 @ ESXi 7.0.1:2 x Intel Xeon CPU E5-2450L @ 1.80GHz, 160GB RAM ECC, 2x 1TB SSD
ASRock J4205-ITX @ Debian 11 16BG RAM, 2x 1TB SSD, 1x 1TB HDD
|