Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- res=0
- all=0
- for i in $(find . -name "*.scm"); do
- all=`expr $all + $(sed '/^\s*$/d' $i | wc -l)`
- res=`expr $res + 1`
- done
- echo "Scheme : number of files - $res ; number of strings in files : $all"
- res=0
- all=0
- for i in $(find . -name "*.c"); do
- all=`expr $all + $(sed '/^\s*$/d' $i | wc -l)`
- res=`expr $res + 1`
- done
- echo "C : number of files - $res ; number of strings in files : $all"
- res=0
- all=0
- for i in $(find . -name "*.py"); do
- all=`expr $all + $(sed '/^\s*$/d' $i | wc -l)`
- res=`expr $res + 1`
- done
- echo "Python : number of files - $res ; number of strings in files : $all"
- res=0
- all=0
- for i in $(find . -name "*.sh"); do
- all=`expr $all + $(sed '/^\s*$/d' $i | wc -l)`
- res=`expr $res + 1`
- done
- echo "Bash : number of files - $res ; number of strings in files : $all"
- res=0
- all=0
- for i in $(find . -name "*.cs"); do
- all=`expr $all + $(sed '/^\s*$/d' $i | wc -l)`
- res=`expr $res + 1`
- done
- echo "C# : number of files - $res ; number of strings in files : $all"
- res=0
- all=0
- for i in $(find . -name "*.cpp"); do
- all=`expr $all + $(sed '/^\s*$/d' $i | wc -l)`
- res=`expr $res + 1`
- done
- echo "C++ : number of files - $res ; number of strings in files : $all"
- #^ - начало строки
- #\s* - пробельные символы
- #$ - конец строки
- #d - удаление того, что в паттерне
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement