bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: Problem with redirecting cat command output to a file


From: Pratiksha Powar
Subject: Re: Fwd: Problem with redirecting cat command output to a file
Date: Tue, 18 Sep 2007 11:34:34 +0530

Thank you all very much.
The problem has been solved.
It was the spurious carriage returns.
I'm now using the command : stty -igncr
asking bash to ignore the carriage returns.


On 9/11/07, Eric Blake <address@hidden> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Pratiksha Powar on 9/11/2007 12:14 AM:
> > Problem 1:
> > --------
> > Following is the code (in a shell script)which redirects find command
> output
> > to a file called "src". But this command generates a file called "src?"
> > instead.
> >
> > SOURCE_PATH="src"
> > rm -f $SOURCE_PATH
> > #Getting all OPS src files
> > find ../../com/onmobile/noc/common -name *.java > src
>
> Do you have spurious carriage returns (\r) in your script file?  Unix
> shells treat it like any other file name character, even if it doesn't
> show up visually.  So it probably created the file 'src\r', which ls then
> displays as 'src?' with its default quoting options.  One way to confirm
> this would be using 'cat -A src*'.
>
> - --
> Don't work too hard, make some time for fun as well!
>
> Eric Blake             address@hidden
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Cygwin)
> Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFG5oSc84KuGfSFAYARAhkEAJ47G4Th/PySvVWcHyH2FfjQaOJTWgCbBP1P
> P1n77EgdB5uadaQ2tXI7Ty0=
> =uERn
> -----END PGP SIGNATURE-----
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]