home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!col.hp.com!fc.hp.com!pbm
- From: pbm@fc.hp.com (Peter McLain)
- Subject: Re: timing piped commands
- Sender: news@fc.hp.com (news daemon)
- Message-ID: <BzM9Iw.IGF@fc.hp.com>
- Date: Mon, 21 Dec 1992 15:54:32 GMT
- References: <1992Dec19.010201.2100@cs.sfu.ca>
- Organization: Hewlett-Packard Fort Collins Site
- X-Newsreader: TIN [version 1.1.3 PL6]
- Lines: 16
-
- Xiaobing Chen (xiaobing@cs.sfu.ca) wrote:
- : Anybody tell me how to 'time' piped commands like:
- : % time 'ls -lR | fgrep root' # failed of course
- :
- You didn't mention which shell you are using, but from the prompt, I
- assume csh. My man page for csh says that time only works on simple
- commands, so you may be out of luck with csh (but I never use csh, so
- could be wrong).
-
- If you have ksh, then the following will work:
-
- $ time { ls -lR | fgrep root ;}
-
- Peter McLain
- pbm@fc.hp.com
-
-