Loading ...
Sorry, an error occurred while loading the content.

15621Re: [LINUX_Newbies] Re: Selective portion of a file

Expand Messages
  • horrorvacui@gmx.net
    Jul 1, 2003
      On Tue, 01 Jul 2003 11:13:39 -0000
      "p_s_rathi" <p_s_rathi@...> wrote:

      > Yeah thats true,
      > but it will display all occurences of particular string in file.
      > Is it possible to display whole function's code(suppose the code of
      > main() in .c file)? any command for that?or any good editor which
      > will save time for it.

      No. Something like that is a bit too complicated and too useless to
      program. You use cat to output a file to stdout, if you search for
      occurences of a string you pipe it through grep, and if you want to
      navigate in the file you open it with a viewer or a text editor. Every
      task has its tool, and it's not the cat's fault that you're using it for
      something it's not meant for. Try using less as a viewer - it lets you
      navigate in much the same way you'd do in vi.


      Horror Vacui

      Registered Linux user #257714

      Go get yourself... counted: http://counter.li.org/
      - and keep following the GNU.
    • Show all 6 messages in this topic