On Thu, Sep 13, 2012 at 4:11 PM, Alain Reguera Delgado <alain.reguera@xxxxxxxxx> wrote: > On 09/09/2012 02:31 AM, Akemi Yagi wrote: >>> 1. ${HOME}/artwork/trunk/Scripts/Bash/centos-art.sh prepare >>> --set-environment >> >> This added 2 more lines in the output: >> >> grep '^function ' ${FILE} | cut -d' ' -f2) >> grep '^function ' ${FILE} | cut -d' ' -f2) >> grep '^function ' ${FILE} | cut -d' ' -f2 >> echo $ARG | sed "s/'/\\\0x27/g") >> echo $ARG | sed "s/'/\\\0x27/g" >> echo $ARG | sed "s/'/\\\0x27/g") >> echo $ARG | sed "s/'/\\\0x27/g" >> >> presumably because the command had one more argument. I let it run for >> 4 hrs before terminating. > > I think a closer look into the script will be needed here. > > Please open the file `trunk/Scripts/Bash/Functions/Commons/init.sh' and > look for the following section: > > 66 # Initialize common functionalities. > 67 for FILE in ${FILES};do > 68 if [[ -x ${FILE} ]];then > 69 . ${FILE} > 70 export -f $(grep '^function ' ${FILE} | cut -d' ' -f2) > 71 else > 72 echo "`eval_gettext "The \\\$FILE needs to have execution > rights."`" > 73 exit > 74 fi > 75 done > > Here is the grep '^function ' ${FILE} | cut -d' ' -f2 stuff. It should > look like above in your working copy. Can you see anything wrong in this > code? > > Could you verify that the Bash interpreter passes through this block of > code without any error in your workstation, please. For example, add the > following two lines after `done' statement (on line 75): > > 76 echo 'Without errors so far.' > 77 exit > > and run the script again: > > ~/artwork/trunk/Scripts/Bash/centos-art.sh prepare --set-environment As expected, it finished instantly with a display of "Without errors so far." It is not that step that gets stuck but the next one : echo $ARG | sed "s/'/\\\0x27/g" As I add more argument to the script, this output gets added accordingly. Akemi _______________________________________________ CentOS-docs mailing list CentOS-docs@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos-docs