Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #266278
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: counting commas |
| Date | 2024-01-19 16:30 +0100 |
| Message-ID | <HXYYF-4a8y-5@gated-at.bofh.it> (permalink) |
| References | <HXWk9-48pp-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
Greg Wooledge wrote:
> unicorn:~$ string="apple,banana,cherry,date"
> unicorn:~$ commas=${string//[!,]/}
> unicorn:~$ echo "${#commas}"
> 3
Always astonishing what a good bashism can do.
> But at this point, we have to wonder what the *actual* goal is.
Up to now we only know about the astonishment of fxkl47BF@protonmail.com
that grep -c does not count characters.
For a more complicated use case i would write a little C program where
i'd be in control of every single bit of throughput.
(Ok, C causes scars on the programmer's self esteem. But what does not
kill me makes me just stronger. I'm a vim user.)
Have a nice day :)
Thomas
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
counting commas fxkl47BF@protonmail.com - 2024-01-19 08:20 +0100
Re: counting commas John Crawley <john@bunsenlabs.org> - 2024-01-19 08:30 +0100
Re: counting commas <tomas@tuxteam.de> - 2024-01-19 09:10 +0100
Re: counting commas "Thomas Schmitt" <scdbackup@gmx.net> - 2024-01-19 09:30 +0100
Re: counting commas Michael Grant <mgrant@grant.org> - 2024-01-19 12:20 +0100
Re: counting commas Greg Wooledge <greg@wooledge.org> - 2024-01-19 13:40 +0100
Re: counting commas "Thomas Schmitt" <scdbackup@gmx.net> - 2024-01-19 16:30 +0100
Re: counting commas fxkl47BF@protonmail.com - 2024-01-19 16:40 +0100
Re: counting commas Greg Wooledge <greg@wooledge.org> - 2024-01-19 17:50 +0100
Re: counting commas fxkl47BF@protonmail.com - 2024-01-19 18:30 +0100
Re: counting commas debian-user@howorth.org.uk - 2024-01-19 18:30 +0100
Re: counting commas John Hasler <john@sugarbit.com> - 2024-01-19 21:10 +0100
Re: counting commas Nicholas Geovanis <nickgeovanis@gmail.com> - 2024-01-20 04:00 +0100
Re: counting commas Nicholas Geovanis <nickgeovanis@gmail.com> - 2024-01-20 05:00 +0100
Re: counting commas David Wright <deblis@lionunicorn.co.uk> - 2024-01-20 00:10 +0100
Re: counting commas Cindy Sue Causey <butterflybytes@gmail.com> - 2024-01-20 01:10 +0100
Re: counting commas Peter Hillier-Brook <phb@hbsys.plus.com> - 2024-01-20 01:10 +0100
Re: counting commas Curt <curty@free.fr> - 2024-01-20 18:20 +0100
Re: counting commas Greg Wooledge <greg@wooledge.org> - 2024-01-20 18:30 +0100
Re: counting commas fxkl47BF@protonmail.com - 2024-01-20 18:40 +0100
Re: counting commas Curt <curty@free.fr> - 2024-01-20 18:40 +0100
Re: counting commas David Wright <deblis@lionunicorn.co.uk> - 2024-01-20 21:10 +0100
Re: counting commas Nicholas Geovanis <nickgeovanis@gmail.com> - 2024-01-20 03:50 +0100
Re: counting commas gene heskett <gheskett@shentel.net> - 2024-01-20 06:50 +0100
Re: counting commas gene heskett <gheskett@shentel.net> - 2024-01-20 07:00 +0100
Re: counting commas "Roy J. Tellason, Sr." <roy@rtellason.com> - 2024-01-20 21:40 +0100
Re: counting commas gene heskett <gheskett@shentel.net> - 2024-01-20 22:10 +0100
Re: counting commas John Hasler <john@sugarbit.com> - 2024-01-21 01:10 +0100
Re: counting commas gene heskett <gheskett@shentel.net> - 2024-01-21 01:20 +0100
Re: counting commas John Hasler <john@sugarbit.com> - 2024-01-21 01:30 +0100
Re: counting commas gene heskett <gheskett@shentel.net> - 2024-01-21 02:10 +0100
csiph-web