The script which I have requires two inputs one is the filepath and the other being filename which is used to check the existence of a file using find command.#!/bin/bashFilepath=$1Filename=$2if [ -z $Filepath ] && [ -z $Filename ]then        echo Requires Inputelif [ ! -z $Filepath ] && [ ! -z $Filename ]then        Found=`find $Filepath -iname $Filename`                if [ -z $Found ]                then                        echo Not Found                else                        echo $Found                fifiThis works completely fine as expected. Later I had to add couple of more conditions to this script i.e. if we get only the filename as the input parameter the we have search that file in the entire file system as given belowfind / -iname $FilenameAnd in case if only the filepath input parameter is passed to this script then it has to echo that file name parameter is also required or just has to come out.
Check the input parameter and execute accordingly
linux;shell script