Untitled
Anonymous
plain_text
05/29/2024 6:13 PM
676 B
17
Indexable
#!/bin/bash read -p "enter your directory for search: " path echo "" countall=0 allline=0 allword=0 for x in `find $path -type f` do ((countall++)) line=`cat $x | wc -l` word=`cat $x | wc -w` allline=$((allline + line)) allword=$((allword + word)) echo "$x --- line= $line ---- word= $word" echo "-----------------------------------" done echo "------------------------------------------------------------------" echo "in your directory : --> files= $countall lines= $allline words= $allword" echo ""
Editor is loading...
Leave a Comment