Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

most extreme grep challenge

Name: Anonymous 2007-06-13 19:45 ID:QhD//lsC

% ls
abc abcd q
% grep --version
grep (GNU grep) 2.5.1
% ls | grep ______
abc
========================================
Fill in the blank and no flags fags.  I will judge all entries,
and decide upon the winrars.

Name: Anonymous 2007-06-13 20:05 ID:Heaven

you are a moron.

Name: Anonymous 2007-06-13 20:21 ID:Heaven

>>2
you are a moron.

Name: Anonymous 2007-06-13 20:26 ID:Heaven

>>2
>>3
you are a mormon

Name: Anonymous 2007-06-13 20:46 ID:1LgHFRYi

'[^dq]$'
'^.\{3\}$'
'c\>'

There are a billion other ways to do it. This is supposed to be extreme?

Name: Anonymous 2007-06-14 0:59 ID:Heaven

According to the specification, ls produces one line, containing the text abc abcd dq, so none of these will work; grep cannot chop a line.

Name: Anonymous 2007-06-14 1:05 ID:Heaven

btw, assuming multiple lines, c$ is the shortest possible answer.

Name: Anonymous 2007-06-14 2:50 ID:P+Np0woQ

oh hi

% touch abc abcd q
% ls
abc  abcd  q
% grep --version
grep (GNU grep) 2.5.1
% man grep
[...]
-w, --word-regexp
Select  only  those  lines containing matches that form whole words.  The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character.  Similarly, it must be either at the end  of  the  line  or followed by a non-word constituent character.  Word-constituent characters are letters, digits, and the underscore.
[...]
% ls | grep -w abc
abc

Name: Anonymous 2007-06-14 3:28 ID:Heaven

>>1
RTFM

Name: Anonymous 2007-06-14 9:30 ID:S7K4HfjW

>>6
By default, ls lists one entry per line to standard output; the excep-
tions are to terminals or when the -C or -x options are specified.


>>8
no flags

>>1
`echo 'printf"%x\$",2+exp(4*atan2 1,1)>>1'|perl`

Name: Anonymous 2007-06-14 18:28 ID:XWlRkYQ3

>>10
The version of ls used was not specified. There's no way to be certain that it adheres to any given standard.

Name: Anonymous 2007-06-15 10:45 ID:dp3X9Gnc

I WANTR AN ANSWER

Name: Anonymous 2009-01-14 14:51


Don't change these.
Name: Email:
Entire Thread Thread List