1.
#!/bin/sh
for file in `find $HOME -name "*.a"`; do
cat $file >>$HOME/total.a
rm -f $file
done
2.
#!/bin/sh
for file in `ls $1`; do
ls -l $1/$file | egrep '^-rwxrwxrwx' >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "$1/$file: file attribute 777!"
chmod 754 $1/$file
fi
done