Try echo $SHELL to find your shell. Or just ps. "which shell" looks for a command named shell, which isn't much help.
How about this, with -name to avoid the grep. This checks in the filename. -path would check in the file path instead.
find . -type f -ctime -1 -name '*abc*' | while IFS="" read -r FILE
do
echo "$FILE"
done
The IFS avoids having read split on anything, and the -r prevents it from trying to evaluate backslashes. It's a good habit when you want read to give you literal, unchanged input...
One caveat: Variables you set inside the "while" won't be set outside the loop. The | puts the loop into a separate, independent subshell.
$
$ cat kshlooptest
#! /bin/ksh
LAST="nothing"
find /etc -name 'w*' 2> /dev/null | while IFS="" read name ; do
LAST=$name
done
echo outside of while loop LAST = $LAST
exit 0
$
$
$ ./kshlooptest
outside of while loop LAST = /etc/gconf/schemas/window-list.schemas
$
Yes, I know. ksh yes, absolutely-anything-other-than-ksh no.
This cuts both ways incidentally. It's possible for ksh to break a script from variables behind a pipe having a different scope than specified by POSIX.
So, variable assignments in a while loop in a pipeline are allowed, but not required, to be visible in the current shell execution environment after the pipeline terminates.
The last element of a pipeline is run in the current shell execution environment in ksh .
The last element of a pipeline is run in a subshell environment in bash .
On this point, both are OK according to the standard.