I got what you meant. This is what I was talking about
:
'skip.sh 5 14'
Code:
skipBegin=$1
skipEnd=$2
echo "Linuxquestions.org" > /tmp/file.dat
dd if=/tmp/file.dat bs=1 skip=0 count=$skipBegin of=/tmp/file1.dat
dd if=/tmp/file.dat bs=1 skip=$skipEnd of=/tmp/file2.dat
cat /tmp/file?.dat
This, of course, is a bash script and not C code, so I guess it's not what you're looking for.