TCH (statz) | ![]() #1, Főfasz (10503) |
587 | #4171 | ^ | Idézet | Thu, 02 Mar 2017 13:17:41 +01 |
94.21.*.* |
![]() ![]() |
*.pool.digikabel.hu |
#!/bin/sh
if [ "$1" = "" ];
then
echo "subfile <input file> <output file> <start offset> [stop offset]"
exit 0
fi
if [ "$4" = "" ];
then
dd if="$1" of="$2" bs="$3" skip=1
else
if [ "$3" = "0" ];
then
dd if="$1" of="$2" bs="$4" count=1
else
dd if="$1" bs="$4" count=1 | dd of="$2" bs="$3" skip=1
fi
fi Usage:subfile <input file> <output file> <start offset> [stop offset] |