不能,但是可以使用文件来完成
#!/bin/sh# if we don't have a file, start at zeroif [ ! -f "/tmp/value.dat" ] ; then value=0# otherwise read the value from the fileelse value=`cat /tmp/value.dat`fi# increment the valuevalue=`expr ${value} + 1`# show it to the userecho "value: ${value}"# and save it for next timeecho "${value}" > /tmp/value.dat


