txt文件转成bin文件shell脚本

来源:互联网 发布:微信版邀请函制作软件 编辑:程序博客网 时间:2024/06/05 19:22
#!/bin/shfor file in `ls -1 *.txt`dodos2unix ${file}#echo "file:${file}"rm -rf ${file}.binwhile read linedo#echo "line:${line}"echo -e -n "`echo "${line}" | cut -d : -f 2 | sed 's/ //g' |  sed 's/../\\\x&/g'`\c" >> ${file}.bindone < ${file}done

0 0
原创粉丝点击