help with unix script

i want to iterate through all files in the directory, even ones that start with '.' ( i guess that means its hidden or something), but if i do
for name in *; do
echo -c "%n" $name
done

will this print all files even if it starts with a . ?

Those are hidden, but you can match them with .* Be careful to exclude ".." and "." though.

for name in * .*; do
  [ "$name" == "." ] && continue
  [ "$name" == ".." ] && continue
  [ -e "$name" ] || continue
  ...
done

I've never heard of this "-c" option for echo and wouldn't reccomend using it. It looks like it could be done with printf, which is nearly the same everywhere.

how do i use the stat command, i have
stat -c "%n,%F,%i,%s" $name

in my script and i get this error

stat: missing operand
Try `stat --help' for more information.

$file is an empty string, which is why you get that message.

As for why $file is an empty string, I can't even guess, as you haven't posted your code.