• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting Additions: Embracing the Horror of Unix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Additions: Embracing the Horror of Unix


  • Subject: Re: Scripting Additions: Embracing the Horror of Unix
  • From: John W Baxter <email@hidden>
  • Date: Fri, 1 Feb 2002 22:47:27 -0800

At 13:18 +1100 2/2/2002, Timothy Bates wrote:
>I would use grep, but I can't get it to not want a file as input.

It takes standard input in the absence of a file:

[fox:~] john% echo "This is a test" | grep This
This is a test

Or, slightly less uninteresting (only slightly):
[fox:~] john% history | grep This
152 22:40 echo "This is a test" | grep this
153 22:41 echo "This is a test" | grep This
154 22:42 history | grep This

In the absence something put onto standard input, it--when run
interactively--takes keyboard input:

[fox:~] john% grep This
this is a test
This is a test
This is a test
So is this
And This
And This


(About the only use I have made of that is as a quick test of a proposed
regular expression. I propose far more of the darn things than I can use.
;-( )

--John
--
John Baxter email@hidden Port Ludlow, WA, USA


References: 
 >Re: Scripting Additions: Embracing the Horror of Unix (From: Timothy Bates <email@hidden>)

  • Prev by Date: Re: ACGI form parsing in OSX?
  • Next by Date: Re:applescript-users digest, Vol 3 #100 - 13 msgs
  • Previous by thread: Re: Scripting Additions: Embracing the Horror of Unix
  • Next by thread: Re: Scripting Additions: Embracing the Horror of Unix
  • Index(es):
    • Date
    • Thread