#!/bin/sh

sum() {
  x=`expr $1 + $2`
  echo $x
}

sum 4 7
echo “The sum of 4 and 7 is `sum 4 7`”

 

http://www.tech-recipes.com/bourne_shell_scripting_tips541.html

 

arrow
arrow
    全站熱搜

    igogo 發表在 痞客邦 留言(0) 人氣()