- Only one script which does not define "PATH" was found before.
- Also, there was problem in checking exception.
- Fix these two bugs.
Change-Id: I7f59bc960adcd6380aac6b938465b1553a6ebb5f
# args : $1 = file path
function CHECK_EXCEPTION
{
- temp=$(cat $exception_file_path | grep $1)
+ temp=$(grep $1 <<< cat $exception_file)
if [ -n "$temp" ]
then
return 1
# Main Check function : find shell scripts in the system.
function CHECK
{
- # check only for /usr /opt /etc
- #find /opt /usr /etc -type f -exec $utl_path/file {} \; 2>/dev/null | grep "shell script" | cut -d ":" -f1 >> $script_list_path
find / -type f -executable 2>/dev/null | xargs $utl_path/file | grep "shell script" | cut -d ":" -f1 >> $script_list_path
-
while read script_file_line
do
PATH_CHECK $script_file_line
- done < <(cat $script_list_path)
+ done < $script_list_path
}
# Rename file util