something like:
dir=$1
for file in $dir/* ; do
touch $f
echo -n "$file "
cat $file | wc -w -c
done
or echo "$file `cat $file |wc -w -c`"
If you don't mind the filename on the end, then just
wc -w -c $file
Write a script named lab6s3 that takes a directory as an argument. This script then
touches every file in the given directory, and prints as output (to the console) the name,
word-count, and file size (in bytes) of every file in the directory.
So i have a folder called touchFolder and i need to cycle through it. how can i do this.
so far i have tried the find command
find /home/akhachadouri/touchFolder -print -exec touch {} \
can anyone help.