git.shiar.nl
/
barcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d1d8dbe
)
hello barcat =^.^=
v1.03
author
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 6 Sep 2019 22:22:12 +0000
(
00:22
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 7 Sep 2019 00:07:24 +0000
(
02:07
+0200)
Everybody loves cats!
barcat
patch
|
blob
|
history
diff --git
a/barcat
b/barcat
index 1a70964c320bc2b66fc0abb8ca09112a0e675656..2901486fa5b155092681b72bd531970e2a19dc46 100755
(executable)
--- a/
barcat
+++ b/
barcat
@@
-6,7
+6,7
@@
use List::Util qw( min max sum );
use open qw( :std :utf8 );
use experimental qw( lexical_subs );
use open qw( :std :utf8 );
use experimental qw( lexical_subs );
-our $VERSION = '1.0
2
';
+our $VERSION = '1.0
3
';
use Getopt::Long '2.33', qw( :config gnu_getopt );
sub podexit {
use Getopt::Long '2.33', qw( :config gnu_getopt );
sub podexit {
@@
-135,11
+135,11
@@
__END__
=head1 NAME
=head1 NAME
-
graph - append bar chart to input number
s
+
barcat - graph to visualize input value
s
=head1 SYNOPSIS
=head1 SYNOPSIS
-B<
graph
> [<options>] [<input>]
+B<
barcat
> [<options>] [<input>]
=head1 DESCRIPTION
=head1 DESCRIPTION
@@
-236,64
+236,64
@@
Appended graphics will extend to fill up the entire screen.
Commonly used after counting, such as users on the current server:
Commonly used after counting, such as users on the current server:
- users | sed 's/ /\n/g' | sort | uniq -c |
graph
+ users | sed 's/ /\n/g' | sort | uniq -c |
barcat
Letter frequencies in text files:
cat /usr/share/games/fortunes/*.u8 |
perl -CO -nE 'say for grep length, split /\PL*/, uc' |
Letter frequencies in text files:
cat /usr/share/games/fortunes/*.u8 |
perl -CO -nE 'say for grep length, split /\PL*/, uc' |
- sort | uniq -c |
graph
+ sort | uniq -c |
barcat
Memory usage of user processes:
Memory usage of user processes:
- ps xo %mem,pid,cmd |
graph
-l40
+ ps xo %mem,pid,cmd |
barcat
-l40
Sizes (in megabytes) of all root files and directories:
Sizes (in megabytes) of all root files and directories:
- du -d0 -m * |
graph
+ du -d0 -m * |
barcat
Number of HTTP requests per day:
Number of HTTP requests per day:
- cat log/access.log | cut -d\ -f4 | cut -d: -f1 | uniq -c |
graph
+ cat log/access.log | cut -d\ -f4 | cut -d: -f1 | uniq -c |
barcat
Any kind of database query with leading counts:
echo 'SELECT count(*),schemaname FROM pg_tables GROUP BY 2' |
Any kind of database query with leading counts:
echo 'SELECT count(*),schemaname FROM pg_tables GROUP BY 2' |
- psql -t |
graph
-u
+ psql -t |
barcat
-u
Exchange rate USD/EUR history from CSV download provided by ECB:
curl https://sdw.ecb.europa.eu/export.do \
-Gd 'node=SEARCHRESULTS&q=EXR.D.USD.EUR.SP00.A&exportType=csv' |
Exchange rate USD/EUR history from CSV download provided by ECB:
curl https://sdw.ecb.europa.eu/export.do \
-Gd 'node=SEARCHRESULTS&q=EXR.D.USD.EUR.SP00.A&exportType=csv' |
- grep '^[12]' |
graph
-f',\K' --value-length=7
+ grep '^[12]' |
barcat
-f',\K' --value-length=7
Total population history from the World Bank dataset (XML):
curl http://api.worldbank.org/v2/country/1W/indicator/SP.POP.TOTL |
xmllint --xpath '//*[local-name()="date" or local-name()="value"]' - |
Total population history from the World Bank dataset (XML):
curl http://api.worldbank.org/v2/country/1W/indicator/SP.POP.TOTL |
xmllint --xpath '//*[local-name()="date" or local-name()="value"]' - |
- sed -r 's,</wb:value>,\n,g; s,(<[^>]+>)+, ,g' |
graph
-f1
+ sed -r 's,</wb:value>,\n,g; s,(<[^>]+>)+, ,g' |
barcat
-f1
Movies per year from prepared JSON data:
curl https://github.com/prust/wikipedia-movie-data/raw/master/movies.json |
Movies per year from prepared JSON data:
curl https://github.com/prust/wikipedia-movie-data/raw/master/movies.json |
- jq '.[].year' | uniq -c |
graph
+ jq '.[].year' | uniq -c |
barcat
Pokémon height comparison:
curl https://github.com/Biuni/PokemonGO-Pokedex/raw/master/pokedex.json |
Pokémon height comparison:
curl https://github.com/Biuni/PokemonGO-Pokedex/raw/master/pokedex.json |
- jq -r '.pokemon[] | [.height,.num,.name] | join(" ")' |
graph
+ jq -r '.pokemon[] | [.height,.num,.name] | join(" ")' |
barcat
Git statistics, such commit count by year:
Git statistics, such commit count by year:
- git log --pretty=%ci | cut -b-4 | uniq -c |
graph
+ git log --pretty=%ci | cut -b-4 | uniq -c |
barcat
Or the most frequent authors:
Or the most frequent authors:
- git shortlog -sn |
graph
| head -3
+ git shortlog -sn |
barcat
| head -3
Latency history:
Latency history:
- ping google.com |
graph
-f'time=\K' -t
+ ping google.com |
barcat
-f'time=\K' -t
=head1 AUTHOR
=head1 AUTHOR