Find the answer to your Linux question:
Results 1 to 4 of 4
Hi All, Whenever i execute wc command i will get file name along with that. I want to suppress that, how will do that without using any other command. ex: ...
  1. #1
    Just Joined!
    Join Date
    Aug 2008
    Posts
    49

    wc command

    Hi All,

    Whenever i execute wc command i will get file name along with that.
    I want to suppress that, how will do that without using any other command.

    ex:
    #wc file.c
    10 100 12 file.c

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    You can't! But what exactly is the problem with using other commands, like piping the output of cat to wc? After all, it's the combination of small tools that make UNIX mighty.

  3. #3
    Linux User
    Join Date
    Aug 2006
    Posts
    458
    Quote Originally Posted by GNU-Fan View Post
    You can't! But what exactly is the problem with using other commands, like piping the output of cat to wc? After all, it's the combination of small tools that make UNIX mighty.
    yes you can
    Code:
    # wc < file
    piping the output of cat to wc ? sounds like UUOC. Small combinations of tools can be useful, however too much makes your code ugly and hard to debug.

  4. #4
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Oh, "UUOC", nice.
    I stand corrected

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...