Re: How to fix a 'grep' command from LINUX to UNIX?
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 01/29/04
- Next message: Baron: "Re: Do 'fork' copies the "Code" Memory space?"
- Previous message: Floyd Davidson: "Re: How to fix a 'grep' command from LINUX to UNIX?"
- In reply to: Chris F.A. Johnson: "Re: How to fix a 'grep' command from LINUX to UNIX?"
- Next in thread: Nuage: "Re: How to fix a 'grep' command from LINUX to UNIX?"
- Reply: Nuage: "Re: How to fix a 'grep' command from LINUX to UNIX?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Jan 2004 06:07:16 GMT
In article <bva348$pmagv$3@ID-210011.news.uni-berlin.de>,
"Chris F.A. Johnson" <c.fa.johnson@rogers.com> wrote:
> On Thu, 29 Jan 2004 at 04:39 GMT, William Park wrote:
> > Nuage <khaluaa7@yahoo.com> wrote:
> >> Hello,
> >>
> >> I am having a problem. Could someone help me?
> >>
> >> The following command works in LINUX:
> >>
> >> tail +2 | grep -iv [a-z] /home/usr/...../filefgd.asc >
> >> /home/usr/...../tmp.asc
> >>
> >> It does not work in UNIX:
> >
> > Nonsense. Both will work. By the way, get rid of 'tail' command.
>
> But then he'll get the first line, which he doesn't want.
The first line of what? He didn't give any filenames to the tail
command, so it's going to read from stdin (the terminal if he's entering
these commands interactively). And he *is* giving a filename argument
to grep, so it's going to read that file rather than the output of tail.
Maybe what he meant was:
tail +2 /home/usr/.../filefgd.asc | grep -iv '[a-z]' >
/home/usr/.../tmp.asc
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Next message: Baron: "Re: Do 'fork' copies the "Code" Memory space?"
- Previous message: Floyd Davidson: "Re: How to fix a 'grep' command from LINUX to UNIX?"
- In reply to: Chris F.A. Johnson: "Re: How to fix a 'grep' command from LINUX to UNIX?"
- Next in thread: Nuage: "Re: How to fix a 'grep' command from LINUX to UNIX?"
- Reply: Nuage: "Re: How to fix a 'grep' command from LINUX to UNIX?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|