<br>Hi <br>&nbsp;thanks for the reply <br>&nbsp;i have done&nbsp; what you have said, created a foo.sh file in my root directory and i got the out put as:<br><span style="font-weight: bold;"><span style="font-weight: bold;"><br></span>foo.sh
:</span><br>FOO=`cd &quot;\`echo \&quot;$0\&quot; | sed -n &#39;/\//{s/\/[^\/]*$//;p;}&#39;\`&quot;;cd ..;pwd`<br>echo &quot;$FOO&quot;<br><br>actually the command you gave me <span style="font-weight: bold;">&quot;/bin/sh&nbsp; 
foo.sh&quot;</span> didnt&nbsp; work i typed it as<span style="font-weight: bold;"> /bin/sh &quot;foo.sh&quot;.</span> <br><br><span style="font-weight: bold;">output :</span><br style="font-weight: bold;"><span style="font-weight: bold;">
/home</span><br style="font-weight: bold;"><div><span class="gmail_quote"><br>i changed the foo.sh file location to ~/gccxml-build and run the process<br><br>output:<br>/home/pradeepd<br><br>actually i doent have much knowledge in unix. can you help.
<br>thanks in advance:<br>On 8/21/07, <b class="gmail_sendername">Brad King</b> &lt;<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
pradeep kumar wrote:<br>&gt; Command: /bin/sh<br>&gt; &quot;/home/pradeepd/gccxml/GCC/config_cmake/gcc_platform.sh&quot;<br>&gt; &quot;/home/pradeepd/gccxml-build/GCC/config_cmake/gcc_platform.cmake&quot;<br>&gt; &quot;usr/bin/cmake &quot;
<br>&gt;<br>&gt; Output:<br>&gt; /home/pradeepd/gccxml/GCC/config_cmake/gcc_platform.sh:<br>&gt; /home/pradeepd/gccxml/GC: bad interpreter: No such file or directory<br>[snip]<br>&gt; File: gcc_plarform.sh<br>&gt;<br>&gt; GCC_SOURCE_DIR=`cd &quot;\`echo \&quot;$0\&quot; | sed -n
<br>&gt; &#39;/\//{s/\/[^\/]*$//;p;}&#39;\`&quot;;cd ..;pwd`<br><br>This is very strange.&nbsp;&nbsp;No one has ever had a problem with this script<br>before.&nbsp;&nbsp;Try creating a file &quot;foo.sh&quot; with the contents<br><br>FOO=`cd &quot;\`echo \&quot;$0\&quot; | sed -n &#39;/\//{s/\/[^\/]*$//;p;}&#39;\`&quot;;cd ..;pwd`
<br>echo &quot;$FOO&quot;<br><br>and then run &quot;/bin/sh foo.sh&quot;.&nbsp;&nbsp;What happens?<br><br>-Brad<br></blockquote></div><br>