Archived
2
0
This repository has been archived on 2025-06-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
gpl/DIR819/tools/csv2wiki.sh
2025-06-04 20:36:23 -03:00

38 lines
703 B
Bash
Executable File

#!/bin/sh
if [ $# -ne 1 ];then
echo "error format!please use like this:"
echo "csv2wiki.sh fileName"
exit
fi
./bin/formatcsv $1 9|grep -v ',,,,,,,,' |sed '1d'>.tempcsv
while read line;
do
info=`echo $line|awk -F, '{printf $2}'`;
if [ "$CurInfo" != "$info" ]; then
echo "=="$info"=="
CurInfo=$info
fi
info=`echo $line|awk -F, '{printf $4}'`;
echo "==="$info"==="
info=`echo $line|awk -F, '{printf $6}'`;
echo "# '''预设条件'''"
echo "#:"$info
info=`echo $line|awk -F, '{printf $7}'`;
echo "# '''操作步骤'''"
echo "#:"$info
info=`echo $line|awk -F, '{printf $8}'`;
echo "# '''预期结果'''"
echo "#:"$info
done<.tempcsv
rm -rf .tempcsv