In my .sh file I cannot invoke ant or mv or cp commands but the same commands  executes on terminal.below is my scriptsample.sh file#! /bin/shcp filename.so filename_org.soandroid update project -p .ant cleanant releasepath added in .bashrc file.export PATH=$PATH:/usr/bin/cp, mv , ant are  working only under terminal not via scirpt.
command not found via shell script but works on terminal
shell
As your script is a shell script (/bin/sh), then your PATH entries in .bashrc will not be read as that is for the bash (/bin/bash) interactive shell.To make your PATH entries available to /bin/sh scripts run by a specific user, add the PATH entry to the .profile file in that users home directory.Additionally you could add the full path for each of your commands within the script:/bin/cp filename.so filename_org.soOr set the PATH variable including all the required $PATHS at the beginning of your script.PATH=$PATH:/bin:/usr/bin:xxxexport PATH