Sponsored Content
Top Forums Shell Programming and Scripting [FUN] Get some stats of your project/s Post 302943324 by sea on Thursday 7th of May 2015 09:03:05 AM
Old 05-07-2015
Just asking, are you aware that i created this thread with solved status?
Hence the [FUN] tag.

Anyway, for some reason the lines found jumped from 14541 to 22469, probably cause by the fact that the jpg files are still listed.

So to try it:
Code:
for F in $(find . -type d -name ".git" -prune -o -type f \! -name ".jpg" \! -name ".png" -print)
do	echo "$F"
	COMMENTS=$(( $COMMENTS + $(grep ^"#" "$F" | wc -l) ))
	LINES=$(( $LINES + $(cat "$F" | wc -l) ))
	BLANKS=$(( $BLANKS + $(grep ^[[:space:]]$ "$F" | wc -l) ))
	((FILES+=1))
done

Even with escaped "\.jpg" and/or unescaped "!", the screenshots are shown and their lines counted.
Ironicly, it reports only 2 files more... Smilie

Full output:
Code:
time ./stats.sh
########################################
	Project stats for "tui"
########################################
264 kb	in bin
24 kb	in conf.etc
12 kb	in conf.home
32 kb	in docs/samples
176 kb	in docs/wiki
280 kb	in docs
192 kb	in man
1984 kb	in screenshots
12 kb	in templates/manpage
32 kb	in templates/scripts
12 kb	in templates/usr
64 kb	in templates
36 kb	in themes
13 folders with a total of 3120 kbytes
########################################
./install.sh
./conf.etc/apps.conf
./conf.etc/status.conf
./conf.etc/commands.conf
./conf.etc/tui.conf
./conf.etc/colors.conf
./screenshots/examples-interface_ds_make_kickstart.jpg
./screenshots/tui-list.jpg
./screenshots/compare-themes-xterm.jpg
./screenshots/compare-themes-lxterminal.jpg
./screenshots/compare_with_root_mode.jpg
./screenshots/mini-demo-tui.jpg
./screenshots/tui-browser_textmode_root.jpg
./screenshots/tui-psm.jpg
./screenshots/demo_working_with_conf_files.jpg
./screenshots/tui-log.jpg
./screenshots/examlpes_tui-browser.jpg
./screenshots/tui-status.jpg
./screenshots/tui-printf_splitting.jpg
./screenshots/tui-browser_long.jpg
./screenshots/tui-select.jpg
./screenshots/demo-interface.jpg
./screenshots/tui-progress-examples.jpg
./docs/README.md
./docs/CONFIG.md
./docs/samples/demo-compare-with-bash.sh
./docs/samples/sample_tui-conf-get_and_set.sh
./docs/samples/sample_tui-progress.sh
./docs/samples/demo-interface-top-bottom.sh
./docs/samples/demo-interface-select-loop.sh
./docs/samples/sample_tui-status.sh
./docs/samples/sample_tui-log.sh
./docs/LICENSE
./docs/README-new.md
./docs/INSTALL.md
./docs/wiki/tui-conf-set.md
...
./man/tui-log.1
./man/tui-new-browser.1
./man/tui-new-manpage.1
./man/tui-str-usb.1
./man/tui-press.1
./man/tui-read.1
./man/tui-conf-get.1
...
./bin/tui-bol-gui
./bin/tui-install
./bin/tui-str-extension
./bin/tui-str-genfilename
./bin/tui-str-usb
./bin/tui-indi
Spread across 192 files, there are:
Lines Total: 		 22470
Comment lines: 		 2426
Blank lines: 		 206
Avrg lines p. file: 	 117

real	0m0.751s
user	0m0.290s
sys	0m0.848s

Smilie
 

6 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Fun with FreeBSD

Fun With Automounting on FreeBSD Link: Nice tips for FreeBSD Unix. http://ezine.daemonnews.org/200202/automounting.html (2 Replies)
Discussion started by: killerserv
2 Replies

2. Solaris

SSH doesn't pick up user's project from /etc/project

We have a system running ssh. When a user logs in, they do not get the project they are assigned to (they run under "system"). I verify the project using the command "ps -e -o user,pid,ppid,args,project". If you do a "su - username", the user does get the project they are assigned to (and all... (2 Replies)
Discussion started by: kurgan
2 Replies

3. What is on Your Mind?

fun scripts

Lets get a list of everyones funny scripts (8 Replies)
Discussion started by: JamieMurry
8 Replies

4. Solaris

what is the use of /etc/project file and project administration commands?

i have two doubts.. 1. what is the use /etc/project file. i renamed this file and when i tried to switch user or login with some user account the login was happening slowly. but when i renamed it to original name it was working fine... why so? 2. unix already has useradd and grouadd for... (4 Replies)
Discussion started by: chidori
4 Replies

5. News, Links, Events and Announcements

A new project was posted on The UNIX and Linux Forums project board.

A new project was posted on your project board. Project title: Bash Shell Tutoring Estimated Budget: $50/hr Start date: Immediately Required skills: Linux, Bash, Shell, UNIX I work as a datawarehouse designer and developer. Although I usually stick to the role of an analyst,... (0 Replies)
Discussion started by: Neo
0 Replies

6. Shell Programming and Scripting

FINDING DUPLICATE PROJECT ( directory project )

I have a project tree like that. after running find command with the -no -empty option, i am able to have a list of non empty directory DO_MY_SEARCH="find . -type d -not -empty -print0" MY_EXCLUDE_DIR1=" -e NOT_IN_USE -e RTMAP -e NOT_USEFULL " echo " " > $MY_TEMP_RESULT_1 while... (2 Replies)
Discussion started by: jcdole
2 Replies
JPEGICC(1)						      General Commands Manual							JPEGICC(1)

NAME
jpegicc - little cms ICC profile applier for JPEG. SYNOPSIS
jpegicc [options] input.jpg output.jpg DESCRIPTION
lcms is a standalone CMM engine, which deals with the color management. It implements a fast transformation between ICC profiles. jpegicc is little cms ICC profile applier for JPEG. OPTIONS
-b Black point compensation. -c <0,1,2,3> Precalculates transform. (0=Off, 1=Normal, 2=Hi-res, 3=LoRes) [defaults to 1] -g Marks out-of-gamut colors on softproof. -h <0,1,2> Show summary of options and examples. -i profile Input profile (defaults to sRGB). -m <0,1,2,3> SoftProof intent. -n Ignore embedded profile. -p profile Soft proof profile -o profile Output profile (defaults to sRGB). -q <0..100> Output JPEG quality. -t <0,1,2,3> Intent (0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute). -v Verbose. EXAMPLES
To color correct from scanner to sRGB: jpegicc -iscanner.icm in.jpg out.jpg To convert from monitor1 to monitor2: jpegicc -imon1.icm -omon2.icm in.jpg out.jpg To make a CMYK separation: jpegicc -oprinter.icm inrgb.jpg outcmyk.jpg To recover sRGB from a CMYK separation: jpegicc -iprinter.icm incmyk.jpg outrgb.jpg To convert from CIELab ITU/Fax JPEG to sRGB jpegicc -iitufax.icm in.jpg out.jpg NOTES
For suggestions, comments, bug reports etc. send mail to info@littlecms.com. SEE ALSO
tifficc(1), icc2ps(1), icclink(1), icctrans(1), wtpt(1) AUTHOR
This manual page was written by Shiju p. Nair <shiju.p@gmail.com>, for the Debian project. September 30, 2004 JPEGICC(1)
All times are GMT -4. The time now is 07:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy