are firstnames and lastnames always separated by the same character in each
filename?
are the names separated from the rest of the info in the filename the same
way for each file?
are you doing this once, or will this be a repeating task that would be
handy to automate?
would you be able to prov
On Mon, Aug 16, 2021 at 5:29 PM David Fleck wrote:
> As Wes said, an example or two would help greatly.
>
> --- David Fleck
>
> ‐‐‐ Original Message ‐‐‐
>
> On Monday, August 16th, 2021 at 7:17 PM, wes wrote:
>
> > are firstnames and lastnames always separated by the same character in
>
On Mon, Aug 16, 2021 at 8:17 PM Michael Barnes
wrote:
> Actually, they are callsigns instead of names. A couple of examples:
>
> w7...@k-0496-20210526.txt
> wa7...@k-0497-20210714.txt
> n8...@k-4386-20210725.txt
>
> I would like a simple count of the unique callsigns on a random basis and
> possi
if the @ is consistent with all the files, that makes it relatively easy.
find Processed -type f -printf '%f\n' | sed "s/@.*//" | uniq -c
-wes
On Mon, Aug 16, 2021 at 7:17 PM Michael Barnes
wrote:
> On Mon, Aug 16, 2021 at 5:29 PM David Fleck wrote:
>
> > As Wes said, an example or two would
To get the count of unique callsigns, you can just feed this same command
into wc -l.
find Processed -type f -printf '%f\n' | sed "s/@.*//" | uniq -c | wc -l
-wes
On Mon, Aug 16, 2021 at 7:21 PM wes wrote:
> if the @ is consistent with all the files, that makes it relatively easy.
>
> find Pr
> find Processed -type f -printf '%f\n' | sed "s/@.*//" | uniq -c
can you point me to where it is documented that `find` is guaranteed
to produce an ordered list? yes, it seems to often do so, but i have
learned not to trust it. so i would
... | sort | uniq -c
woulda been cool to use `sort
As Wes said, an example or two would help greatly.
--- David Fleck
‐‐‐ Original Message ‐‐‐
On Monday, August 16th, 2021 at 7:17 PM, wes wrote:
> are firstnames and lastnames always separated by the same character in each
>
> filename?
>
> are the names separated from the rest of the i
On Mon, Aug 16, 2021 at 8:45 PM Randy Bush wrote:
>
> can you point me to where it is documented that `find` is guaranteed
> to produce an ordered list?
>
I don't have any such documentation or belief. my belief is that uniq will
count non-consecutive matches, that's what I'm relying on. however
>From the uniq manpage:
Note: 'uniq' does not detect repeated lines unless they are
adjacent. You may want to sort the input first, or use 'sort -u'
without 'uniq'. Also, comparisons honor the rules specified by
'LC_COLLATE'.
On Mon, Aug 16, 2021 at 10:45 PM wes wrote:
>
> On Mon, Aug 16, 20
>> can you point me to where it is documented that `find` is guaranteed
>> to produce an ordered list?
> I don't have any such documentation or belief. my belief is that uniq
> will count non-consecutive matches
it won't
randy
'cut' might work well also.
> ls | cut -f1 -d@ | sort | uniq -c
to get a list in sort order, or
> ls | cut -f1 -d@ |sort | uniq -c | sort -n
to get a list ordered by frequency.
--- David Fleck
‐‐‐ Original Message ‐‐‐
On Tuesday, August 17th, 2021 at 1:46 AM, Russell Senior
wrote:
Ugh. Sorry, too little coffee. Didn't notice this had already been covered.
--- David Fleck
‐‐‐ Original Message ‐‐‐
On Tuesday, August 17th, 2021 at 7:39 AM, David Fleck
wrote:
> 'cut' might work well also.
>
> > ls | cut -f1 -d@ | sort | uniq -c
>
> to get a list in sort order, or
On Mon, Aug 16, 2021 at 7:25 PM wes wrote:
> To get the count of unique callsigns, you can just feed this same command
> into wc -l.
>
> find Processed -type f -printf '%f\n' | sed "s/@.*//" | uniq -c | wc -l
>
> -wes
>
>
> On Mon, Aug 16, 2021 at 7:21 PM wes wrote:
>
> > if the @ is consistent
13 matches
Mail list logo