Skip to content

obtuse shell scripting in profiling docs

Hi!  I'm looking at this page:

http://haskell.org/ghc/docs/latest/html/users_guide/hp2ps.html

I see a shell command like this:

head -`fgrep -n END_SAMPLE FOO.hp | tail -1 | cut -d :
-f 1` FOO.hp \
    | hp2ps > FOO.ps


It looks like a complex way of saying:

grep END_SAMPLE FOO.hp | hp2ps > FOO.ps


The mantra is repeated a few times in that section, and
(assuming I'm not missing something) should be
simplified in each place.

Regards,

Tim Smith <tim@desert.net>

Trac metadata
Trac field Value
Version 6.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedNoReason
Component Documentation
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information