[Gllug] C and Unix pioneer Dennis Ritchie reported dead

tid td at bloogaloo.co.uk
Mon Oct 31 16:57:58 UTC 2011


A colleague asked my opinion as to whether I felt the following was a
correct answer to an test question:

  Q: Please supply a one-line command to substitute all occurences of
'fish' to 'chips' in all files ending in .html

 -A: $ for i in *.html ; do sed -i -e 's/fish/chips/g' $i ; done

I'm not sure about this : it's written on one line but it's not really a
one-liner or is it? The point of the test is
measure the student's skill and they've shown that they understand in-place
editing so I'm inclined
to give them the point. What do others think?

Tid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20111031/1d83f3ff/attachment.html>
-------------- next part --------------
--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list