脚本_文件合成

来源:互联网 发布:后二计划软件 编辑:程序博客网 时间:2024/05/14 12:03
#!/bin/bash #function : Synthetic file#[ -n "$1" ] || { echo ""; echo "usage:"; echo "     $0 ubootfile uImagefile fsfile"; echo "     e.g." echo "     ./mkboot.sh u-boot.bin rooffs.jffs2"; echo ""; exit 1;  }[ -n "$2" ] || { echo ""; echo "usage:"; echo "     $0 ubootfile uImagefile fsfile"; echo "     e.g." echo "     ./mkboot.sh u-boot.bin rooffs.jffs2"; echo ""; exit 1;  }[ -n "$3" ] || { echo ""; echo "usage:"; echo "     $0 ubootfile uImagefile fsfile"; echo "     e.g." echo "     ./mkboot.sh u-boot.bin rooffs.jffs2"; echo ""; exit 1;  }dd if=$1 of=uboot  bs=1M  conv=syncdd if=$2 of=kernel  bs=4M  conv=synccat uboot kernel $3 > Imagerm uboot kernel

参考

Linux下分割、合并文件——dd和cat

0 0
原创粉丝点击