On Wed, 26 Dec 2012 09:38:18 +0530, Girish Venkatachalam wrote:

> 
> for f in `ls /etc/*`
> do
>             echo "$f"
>              type=`file $f`
>             echo "$f is of type $t"
> done


This code will fail miserably if the directory contains file name with 
spaces. One solution could be is to play with IFS variable.

--ashwin

_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to