I came up with the following code, though I'm not sure if the $(( )) constructs are really necessary, but I simply could not make things work without them. Please let me know if you know a simpler syntax.
#!/bin/sh
#
# The IP address in this example is simply harcoded.
# In actual use, I read and write this from a file.
#
# 192.168.1.100
ipint=3232235876
MASKA=0xFF000000
MASKB=0x00FF0000
MASKC=0x0000FF00
MASKD=0x000000FF
a=$(( ($ipint & $MASKA) >> 24 ))
b=$(( ($ipint & $MASKB) >> 16 ))
c=$(( ($ipint & $MASKC) >> 8 ))
d=$(( $ipint & $MASKD ))
ipstr="$a.$b.$c.$d"
echo "The IP Address is ${ipaddr}."
#
# The IP address in this example is simply harcoded.
# In actual use, I read and write this from a file.
#
# 192.168.1.100
ipint=3232235876
MASKA=0xFF000000
MASKB=0x00FF0000
MASKC=0x0000FF00
MASKD=0x000000FF
a=$(( ($ipint & $MASKA) >> 24 ))
b=$(( ($ipint & $MASKB) >> 16 ))
c=$(( ($ipint & $MASKC) >> 8 ))
d=$(( $ipint & $MASKD ))
ipstr="$a.$b.$c.$d"
echo "The IP Address is ${ipaddr}."