title: Recursive function shell script
body: <pre><code>#!/bin/sh
  
  param1=$1
  param2=$2
  
  recursive(){
     mkdir -p $2
     cd $1
     for file in `ls $1`; do
        [ $file = "." -o $file = ".." ] &amp;&amp; continue
        [ -d $file ] &amp;&amp; recursive $1"/"$file $2"/"$file
        [ -f $file ] &amp;&amp; ln -s $1"/"$file $2"/"$file
     done
  }
  
  recursive $param1 $param2
  </code></pre>
  
  <p>If I execute this script, that it call self (recursive). Why not scan all directories?</p>
  
  <p>(excuse me: my english is poor)</p>