Prev: USB problem - the plot thickens
Next: Ubuntu 10.04 LTS: background to-tops over all running applications!
From: Bruce Stephens on 25 Jun 2010 19:01 Tony Houghton <h(a)realh.co.uk> writes: [...] > egrep -i '^[BCDGJOPQRSU]+$' your_scrabble_file > > etc > > I can't think of a trivial way to sort the results by word length. No, though it feels like there ought to be an option to sort to do that. Easiest is probably to use awk or perl, and then sort (or do the sort inside either one). So perl -n -e 'if (/^[BCDGJOPQRSU]+$/i) {printf "%d\t%s",length,$_;}' \ your_scrabble_file|sort -n
From: David Cowie on 26 Jun 2010 16:08 Thanks everyone for the replies. -- David Cowie http://www.flickr.com/photos/davidcowie/ Containment Failure + 57987:33
From: Simon Brooke on 27 Jun 2010 04:21 On Sat, 26 Jun 2010 21:48:21 +0100, Paul Martin wrote: > In article <88kphrF8u2U2(a)mid.individual.net>, > Simon Brooke wrote: > >> Debian has an anagram generator called 'an' in the repository just now >> - not one I've played with. > > It needs work. It generates loads of duplicates under certain > circumstances. | uniq -- ;; Semper in faecibus sumus, sole profundam variat
From: Simon Brooke on 27 Jun 2010 05:28 On Sun, 27 Jun 2010 08:21:17 +0000, Simon Brooke wrote: > On Sat, 26 Jun 2010 21:48:21 +0100, Paul Martin wrote: > >> It needs work. It generates loads of duplicates under certain >> circumstances. > > | uniq Or, actually, | sort | uniq -- ;; Semper in faecibus sumus, sole profundam variat
From: Jim A on 27 Jun 2010 07:43 On 06/27/2010 10:28 AM, Simon Brooke wrote: > On Sun, 27 Jun 2010 08:21:17 +0000, Simon Brooke wrote: > >> On Sat, 26 Jun 2010 21:48:21 +0100, Paul Martin wrote: >> >>> It needs work. It generates loads of duplicates under certain >>> circumstances. >> >> | uniq > > Or, actually, | sort | uniq > Or, pedantically, | sort -u -- www.slowbicyclemovement.org - enjoy the ride
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: USB problem - the plot thickens Next: Ubuntu 10.04 LTS: background to-tops over all running applications! |