This is my first ever bash script. What i wish to achieve is to find all files in current directory except the script file and count lines in each found file. Some thing seems to be wrong with the if statement Please help why it does not work? and maybe you have some ideas how to improve this script
#!/bin/bash
files=$(find . -maxdepth 1 -not -type d)
me=$(basename $0)
echo $me
for f in $files
do
if [$f != $me]
then
echo $(wc -l $f);
fi
done