Sponsored Content
Top Forums Shell Programming and Scripting [FUN] Get some stats of your project/s Post 302943271 by Chubler_XL on Thursday 7th of May 2015 02:33:47 AM
Old 05-07-2015
You could replace your Lines section with the below for more speed:

Code:
# Lines
vals=( $( awk -v q="^#,.*,^[[:space:]]*$" '
       BEGIN{cc=split(q,crit,",")}
       { for(i in crit) t[i]+=($0 ~ crit[i]) }
       END { for(i=1; i<=cc;i++) printf "%d ",t[i] }' \
       $(find . -type f -name "st*") )
)
((COMMENTS=vals[0]))
((LINES=vals[1]))
((BLANKS=vals[2]))

This User Gave Thanks to Chubler_XL For This Post:
 

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
Audio::MPD::Common::Stats(3pm)				User Contributed Perl Documentation			    Audio::MPD::Common::Stats(3pm)

NAME
Audio::MPD::Common::Stats - class representing MPD stats VERSION
version 1.120881 DESCRIPTION
The MPD server maintains some general information. Those information can be queried with the mpd modules. Some of those information are served to you as an Audio::MPD::Common::Stats object. An Audio::MPD::Common::Stats object does not update itself regularly, and thus should be used immediately. Note: one should never ever instantiate an Audio::MPD::Common::Stats object directly - use the mpd modules instead. ATTRIBUTES
$stats->artists; Number of artists in the music database. $stats->albums; Number of albums in the music database. $stats->songs; Number of songs in the music database. $stats->uptime; Daemon uptime (time since last startup) in seconds. $stats->playtime; Time length of music played. $stats->db_playtime; Sum of all song times in the music database. $stats->db_update; Last database update in UNIX time. AUTHOR
Jerome Quelin COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-04-01 Audio::MPD::Common::Stats(3pm)
All times are GMT -4. The time now is 11:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy