public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: cygwin commands (cat,grep) not working in my windows 2008 machine
       [not found] <1345167629309-47356.post@n5.nabble.com>
@ 2012-08-17  2:08 ` cyberdon
  2012-08-17 15:06   ` Christopher Faylor
  0 siblings, 1 reply; 8+ messages in thread
From: cyberdon @ 2012-08-17  2:08 UTC (permalink / raw)
  To: cygwin

HI, 

I was getting error when tryin to run cat command as well but once i ran it
like this:

/bin/cat pinger.data

then it began to work and the data from file "pinger.data" was parsed out
Maybe this'll work for you.
Thanks!

Cyberdon



--
View this message in context: http://cygwin.1069669.n5.nabble.com/cygwin-commands-cat-grep-not-working-in-my-windows-2008-machine-tp47356p92067.html
Sent from the Cygwin list mailing list archive at Nabble.com.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cygwin commands (cat,grep) not working in my windows 2008 machine
  2012-08-17  2:08 ` cygwin commands (cat,grep) not working in my windows 2008 machine cyberdon
@ 2012-08-17 15:06   ` Christopher Faylor
  0 siblings, 0 replies; 8+ messages in thread
From: Christopher Faylor @ 2012-08-17 15:06 UTC (permalink / raw)
  To: cygwin

On Thu, Aug 16, 2012 at 06:40:29PM -0700, cyberdon wrote:
>HI, 
>
>I was getting error when tryin to run cat command as well but once i ran it
>like this:
>
>/bin/cat pinger.data
>
>then it began to work and the data from file "pinger.data" was parsed out
>Maybe this'll work for you.

That implies that your PATH is screwed up and you likely had some other
version of cat in another directory, possibly from a 3PP.

cgf

http://cygwin.com/acronyms/#3PP

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cygwin commands (cat,grep) not working in my windows 2008  machine
  2009-04-02 12:26       ` sudhap85
@ 2009-04-02 17:16         ` Christopher Faylor
  0 siblings, 0 replies; 8+ messages in thread
From: Christopher Faylor @ 2009-04-02 17:16 UTC (permalink / raw)
  To: cygwin

On Thu, Apr 02, 2009 at 05:25:53AM -0700, sudhap85 wrote:
>The same test got passed with cygwin 5.2 in windows 2003.

There is no cygwin 5.2.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cygwin commands (cat,grep) not working in my windows 2008   machine
  2009-04-02 11:51     ` Eric Blake
@ 2009-04-02 12:26       ` sudhap85
  2009-04-02 17:16         ` Christopher Faylor
  0 siblings, 1 reply; 8+ messages in thread
From: sudhap85 @ 2009-04-02 12:26 UTC (permalink / raw)
  To: cygwin


hi,
    The same test got passed with cygwin 5.2 in windows 2003.



Eric Blake wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> According to sudhap85 on 4/2/2009 5:45 AM:
>> Hi,
>>      what i means the problem here is that function is not working for
>> me.
>> (i.e) if i run cat > file1 >>file2. Here file1 content is not copied to
>> file2.
> 
> This is not cygwin specific.  Nor is it how the shell works.  If you want
> output to go to two places, you need to use tee, not multiple redirection
> operators.
> 
> tee file2 < file1 >> file3
> 
> copies file1 into file2 (overwrite) and file3 (append).  You probably want
> to read a good shell tutorial book.
> 
> - --
> Don't work too hard, make some time for fun as well!
> 
> Eric Blake             ebb9@byu.net
> volunteer cygwin coreutils maintainer
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (Cygwin)
> Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAknUppAACgkQ84KuGfSFAYD8DwCeImC/gLouWFsuuwCMaVYPhVBl
> de0AnRneVc9D4xhQZcSCM4AJIyrZcXMt
> =edno
> -----END PGP SIGNATURE-----
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/cygwin-commands-%28cat%2Cgrep%29-not-working-in-my-windows-2008-machine-tp22842028p22846690.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cygwin commands (cat,grep) not working in my windows 2008  machine
  2009-04-02 11:45   ` sudhap85
@ 2009-04-02 11:51     ` Eric Blake
  2009-04-02 12:26       ` sudhap85
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Blake @ 2009-04-02 11:51 UTC (permalink / raw)
  To: cygwin, sudhap

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to sudhap85 on 4/2/2009 5:45 AM:
> Hi,
>      what i means the problem here is that function is not working for me.
> (i.e) if i run cat > file1 >>file2. Here file1 content is not copied to
> file2.

This is not cygwin specific.  Nor is it how the shell works.  If you want
output to go to two places, you need to use tee, not multiple redirection
operators.

tee file2 < file1 >> file3

copies file1 into file2 (overwrite) and file3 (append).  You probably want
to read a good shell tutorial book.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
volunteer cygwin coreutils maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknUppAACgkQ84KuGfSFAYD8DwCeImC/gLouWFsuuwCMaVYPhVBl
de0AnRneVc9D4xhQZcSCM4AJIyrZcXMt
=edno
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: cygwin commands (cat,grep) not working in my windows 2008  machine
  2009-04-02 10:32 ` Phil Betts
@ 2009-04-02 11:45   ` sudhap85
  2009-04-02 11:51     ` Eric Blake
  0 siblings, 1 reply; 8+ messages in thread
From: sudhap85 @ 2009-04-02 11:45 UTC (permalink / raw)
  To: cygwin


Hi,
     what i means the problem here is that function is not working for me.
(i.e) if i run cat > file1 >>file2. Here file1 content is not copied to
file2.
Also Am running perl script (PERL version 5.8.0) in windows 2008 platform. 


Phil Betts-2 wrote:
> 
> sudhap85 wrote:
>>    I am using windows 2008 machine. I have installed latest cygwin.
>> Here I am facing problem with the "cat" "grep" commands. In command 
>> line its working fine. but In my scripts it's giving error.
> 
> So what's the error?  Without this as a clue, we can only guess.
> 
> How are you running your scripts? (e.g. from a bash shell, a cmd
> shell, or from a shortcut)
> 
> My WAG is that $PATH in the script is different from $PATH on the
> command line.
> 
>> Am using PERL script for my testing. These commands are not working 
>> in the following scenario,
>>  1. cat file1 > file2
>>  2. grep 'compileCFFilters' MHSlog >> resultfile
>> I have also installed the Activeperl in my system.
>> Also, I am running the script with PERL 5.8.0 version.
> 
> Please read and follow the instructions in this link:
>> Problem reports:       http://cygwin.com/problems.html
> 
> Pay particular attention to the instruction to run "cygcheck -svr",
> *attaching* the output to your reply (i.e. don't paste it in).
> 
> 
> Phil
> 
> This email has been scanned by Ascribe Ltd using Microsoft Antigen for
> Exchange.
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/cygwin-commands-%28cat%2Cgrep%29-not-working-in-my-windows-2008-machine-tp22842028p22846005.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: cygwin commands (cat,grep) not working in my windows 2008 machine
  2009-04-02  6:58 sudhap85
@ 2009-04-02 10:32 ` Phil Betts
  2009-04-02 11:45   ` sudhap85
  0 siblings, 1 reply; 8+ messages in thread
From: Phil Betts @ 2009-04-02 10:32 UTC (permalink / raw)
  To: cygwin

sudhap85 wrote:
>    I am using windows 2008 machine. I have installed latest cygwin.
> Here I am facing problem with the "cat" "grep" commands. In command 
> line its working fine. but In my scripts it's giving error.

So what's the error?  Without this as a clue, we can only guess.

How are you running your scripts? (e.g. from a bash shell, a cmd
shell, or from a shortcut)

My WAG is that $PATH in the script is different from $PATH on the
command line.

> Am using PERL script for my testing. These commands are not working 
> in the following scenario,
>  1. cat file1 > file2
>  2. grep 'compileCFFilters' MHSlog >> resultfile
> I have also installed the Activeperl in my system.
> Also, I am running the script with PERL 5.8.0 version.

Please read and follow the instructions in this link:
> Problem reports:       http://cygwin.com/problems.html

Pay particular attention to the instruction to run "cygcheck -svr",
*attaching* the output to your reply (i.e. don't paste it in).


Phil

This email has been scanned by Ascribe Ltd using Microsoft Antigen for Exchange.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* cygwin commands (cat,grep) not working in my windows 2008 machine
@ 2009-04-02  6:58 sudhap85
  2009-04-02 10:32 ` Phil Betts
  0 siblings, 1 reply; 8+ messages in thread
From: sudhap85 @ 2009-04-02  6:58 UTC (permalink / raw)
  To: cygwin


Hi,
   I am using windows 2008 machine. I have installed latest cygwin. Here I
am facing problem with the "cat" "grep" commands. In command line its
working fine. but In my scripts it's giving error. Am using PERL script for
my testing. These commands are not working in the following scenario,
 1. cat file1 > file2
  2. grep 'compileCFFilters' MHSlog >> resultfile
I have also installed the Activeperl in my system.
Also, I am running the script with PERL 5.8.0 version.


Thanks in advance.

-- 
View this message in context: http://www.nabble.com/cygwin-commands-%28cat%2Cgrep%29-not-working-in-my-windows-2008-machine-tp22842028p22842028.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-08-17 14:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1345167629309-47356.post@n5.nabble.com>
2012-08-17  2:08 ` cygwin commands (cat,grep) not working in my windows 2008 machine cyberdon
2012-08-17 15:06   ` Christopher Faylor
2009-04-02  6:58 sudhap85
2009-04-02 10:32 ` Phil Betts
2009-04-02 11:45   ` sudhap85
2009-04-02 11:51     ` Eric Blake
2009-04-02 12:26       ` sudhap85
2009-04-02 17:16         ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).