"read" bug in Cygwin 1.5.16?

2005-05-01 Thread Peter Farley
Hi all,

I tried to forward this message to the main cygwin
list yesterday, but had a little trouble getting it
there, probably because I mentioned "xterm" in the
subject.  I'm trying again in case this is NOT an "X"
problem but a base cygwin problem.

I have attached the test program xtermbug.c instead 
of pasting it inline.  I hope that is OK for this
list.

If there is anything I can do to help debug the reason
I am seeing this problem, please just tell me what to
do.

BTW, thanks to all the developers for an awesome
product.

Regards,

Peter Farley

--- Peter Farley <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> The following program demonstrates what looks to me
> like a bug in the "read" function in an xterm (as
> opposed to a Cygwin console window).  To run the
> test, compile with:
> 
> gcc -g -o xtermbug.exe xtermbug.c
> 
> When you run it in a console window, you can enter
> normal keyboard characters, then a return to see
> "cmdline=".  Press the Esc key to
> exit the program.
> 
> When run in an xterm window, the first keypress
> causes this behavior:
> 
> 1. Select returns with rc = 0 and readset set to
> indicate that a key was received
> 2. "read" returns with kblen = 1 and kbbuf[0] = '\0'
> 3. (1) and (2) repeat forever.
> 
> I put in a "maxdbg" parameter and terminate the
> program after 5 occurrences of this loop.
> 
> This problem was first detected trying to run a copy
> of the hercules IBM mainframe emulator in a Cygwin
> xterm window.  The code below is extracted and
> minimalized as much as possible from the hercules
> keyboard input routine.
> 
> Peter Farley


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com /*---*/
/* This is a test program to show a cygwin xterm bug, possibly   */
/* in the read function. */
/*---*/

/*---*/
/* Definitions for keyboard input sequences  */
/*---*/
#define KBD_DELETE  "\x1B[3~"

#include 
#include 
#include 
#include 
#include 
#include 

#define MSG_SIZE80  /* Size of one message   */
#define CMD_SIZE 32767  /* Length of command line*/

#define BYTE unsigned char

int ttyreset = 0;
struct  termios kbattr; /* Terminal I/O structure*/

/*---*/
/* xterm display subroutine  */
/*---*/

void xterm_display (void)
{
int rc; /* Return code   */
int i;  /* Array subscripts  */
charcmdline[CMD_SIZE+1];/* Command line buffer   */
int cmdoff = 0; /* Cursor position in cmdline*/
int cmdlen = 0; /* Number of bytes in cmdline*/
//BYTEc;  /* Character work area   */
FILE   *confp;  /* Console file pointer  */
size_t  kbbufsize = CMD_SIZE;   /* Size of keyboard buffer   */
char   *kbbuf = NULL;   /* Keyboard input buffer */
int kblen;  /* Number of chars in kbbuf  */
int keybfd; /* Keyboard file descriptor  */
int maxfd;  /* Highest file descriptor   */
fd_set  readset;/* Select file descriptors   */
struct  timeval tv; /* Select timeout structure  */
int maxdbg = 0;

/* Set up the input file descriptors */
confp = stdout;
keybfd = STDIN_FILENO;

fprintf(confp, "start kbbuf=%8.8X,&kbbuf=%8.8X\n", 
kbbuf, &kbbuf);

/* Obtain storage for the keyboard buffer */
if (!(kbbuf = (char *)malloc (kbbufsize)))
{
fprintf(stderr, "HHCPN002S Cannot obtain keyboard buffer: %s\n",
strerror(errno));
return;
}

fprintf(confp, "start kbbuf=%8.8X,&kbbuf=%8.8X,*kbbuf=%8.8X\n", 
kbbuf, &kbbuf, *kbbuf);

/* Set screen output stream to fully buffered */
setvbuf (confp, NULL, _IOFBF, 0);

/* Put the terminal into cbreak mode */
tcgetattr (keybfd, &kbattr);
kbattr.c_lflag &= ~(ECHO | ICANON);
kbattr.c_cc[VMIN] = 0;
kbattr.c_cc[VTIME] = 0;
tcsetattr (keybfd, TCSANOW, &kbattr);
ttyreset 

Re: "read" bug in Cygwin 1.5.16?

2005-05-02 Thread Peter Farley
Thanks Chris.  I will try to test the snapshot soon,
but I may have some RL events interrupting me before I
can do so.

I'll report back after testing.

Peter

--- Christopher Faylor
<[EMAIL PROTECTED]> wrote:
> On Sun, May 01, 2005 at 04:56:13PM -0700, Peter
> Farley wrote:
> >Hi all,
> >
> >I tried to forward this message to the main cygwin
> >list yesterday, but had a little trouble getting it
> >there, probably because I mentioned "xterm" in the
> >subject.  I'm trying again in case this is NOT an
> "X" problem but a base cygwin problem.
> >
> >I have attached the test program xtermbug.c instead
> >of pasting it inline.  I hope that is OK for this
> >list.
> 
> Thanks for the test program.
> 
> There was a problem with setting VMIN == VTIME == 0
> on ttys/ptys.  I've just checked in a fix.  It will 
> be in today's snapshot, when it shows
> up: http://cygwin.com/snapshots/ .
> 
> cgf


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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/



Re: "read" bug in Cygwin 1.5.16?

2005-05-02 Thread Peter Farley
Thanks Brian, but I don't think support on earlier
versions of cygwin is going to be an issue.  There's
only one other person who tried and found this same
bug, so we're somewhat "rara avis" (rare birds).

If the snapshot fix works, I can wait for the release
to come out.  It isn't that urgent, since my
workaround is just to run in a console window instead
of an xterm.

Thanks again for the help.

Peter

--- Brian Dessent <[EMAIL PROTECTED]> wrote:
> 
> Christopher Faylor wrote:
> 
> > There was a problem with setting VMIN == VTIME ==
> 0 on ttys/ptys.  I've
> > just checked in a fix.  It will be in today's
> snapshot, when it shows
> > up: http://cygwin.com/snapshots/ .
> 
> Peter Farley wrote:
> 
> > kbattr.c_cc[VMIN] = 0;
> > kbattr.c_cc[VTIME] = 0;
> 
> If you're always using select() to read, you could
> set VMIN = 1 as a workaround if you need to support 
> versions of Cygwin prior to the above fix.
> 
> Brian


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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/



Re: "read" bug in Cygwin 1.5.16?

2005-05-03 Thread Peter Farley
I tried the 20050501 snapshot today.  The bug has been
squashed.  Both the test program and hercules operate
correctly in an xterm window with the snapshot version
of "cygwin1.dll".

Thank you for the fix.  I will let the hercules list
know that the bug will be resolved in the next
release.

Regards,

Peter

--- Peter Farley <[EMAIL PROTECTED]> wrote:
> Thanks Chris.  I will try to test the snapshot soon,
> but I may have some RL events interrupting me before
> I
> can do so.
> 
> I'll report back after testing.
> 
> Peter
> 
> --- Christopher Faylor
> <[EMAIL PROTECTED]> wrote:
> > On Sun, May 01, 2005 at 04:56:13PM -0700, Peter
> > Farley wrote:
> > >Hi all,
> > >
> > >I tried to forward this message to the main
> cygwin
> > >list yesterday, but had a little trouble getting
> it
> > >there, probably because I mentioned "xterm" in
> the
> > >subject.  I'm trying again in case this is NOT an
> > "X" problem but a base cygwin problem.
> > >
> > >I have attached the test program xtermbug.c
> instead
> > >of pasting it inline.  I hope that is OK for this
> > >list.
> > 
> > Thanks for the test program.
> > 
> > There was a problem with setting VMIN == VTIME ==
> 0
> > on ttys/ptys.  I've just checked in a fix.  It
> will 
> > be in today's snapshot, when it shows
> > up: http://cygwin.com/snapshots/ .
> > 
> > cgf
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.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/
> 
> 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

--
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/



Can I mount an EXT3 partition that WinXP sees as "(Unknown partition)"?

2005-05-03 Thread Peter Farley
On a firewire-mounted external hard drive I have an
EXT3 partition that used to be the root file system
for an RH7.3 linux setup.  Is there any way to mount
such a partition to cygwin when XP doesn't recognize
it with a drive letter?

The partition is primary, not extended.

Regards,

Peter



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

--
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/



Re: Can I mount an EXT3 partition that WinXP sees as "(Unknown partition)"?

2005-05-03 Thread Peter Farley
Thanks Larry.  I only need read access for my home
system and not commercial support, so I'll check out
Explore2fs.

Peter

--- Larry Hall
<[EMAIL PROTECTED]> wrote:
> At 04:00 PM 5/3/2005, you wrote:
> >On a firewire-mounted external hard drive I have an
> >EXT3 partition that used to be the root file system
> >for an RH7.3 linux setup.  Is there any way to
> mount
> >such a partition to cygwin when XP doesn't
> recognize
> >it with a drive letter?
> >
> >The partition is primary, not extended.
> 
> 
> No.  You need software that knows the filesystem
> first.  You can check out Paragon if you're looking
> for commercial support.  There is an older
> free S/W driver for ext2 and NT but I haven't tried
> it since NT 4 and I can't recommend it.  If you're
> just looking to get read access (and/or very 
> touchy write access) and don't mind the slowness of
> a user-land utility, check out Explore2fs
>
.
> I don't know if it works with FireWire but it does
> work fine with local 
> ext3 partitions.




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

--
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/



Re: Can I mount an EXT3 partition that WinXP sees as "(Unknown partition)"?

2005-05-03 Thread Peter Farley
FYI, explore2fs found both my boot and root partitions
on the firewire external drive with no trouble.

Thanks for the pointer, this is just what I needed, an
easy way to copy info over to cygwin.

Peter

--- Larry Hall
<[EMAIL PROTECTED]> wrote:
> At 04:00 PM 5/3/2005, you wrote:
> >On a firewire-mounted external hard drive I have an
> >EXT3 partition that used to be the root file system
> >for an RH7.3 linux setup.  Is there any way to
> mount
> >such a partition to cygwin when XP doesn't
> recognize
> >it with a drive letter?
> >
> >The partition is primary, not extended.
> 
> 
> No.  You need software that knows the filesystem
> first.  You can check out Paragon if you're looking
> for commercial support.  There is an older
> free S/W driver for ext2 and NT but I haven't tried
> it since NT 4 and I can't recommend it.  If you're
> just looking to get read access (and/or very 
> touchy write access) and don't mind the slowness of
> a user-land utility, check out Explore2fs
>
.
> I don't know if it works with FireWire but it does
> work fine with local ext3 partitions.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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/



Re: pwd vs $PWD, bash, cygwin vs Linux

2005-05-04 Thread Peter Farley
But what if it is *not* your Makefile, but someone
else's, e.g. the many GNU source packages that expect
bash behavior?  Surely you don't intend that ordinary
users (well, OK, anyone compiling from a source
package isn't really "ordinary") should modify every
package maintained by GNU in order to make it under
cygwin, do you?

With respect,

Peter

P.S. - If there have already been discussions or if
there already exists documentation on why ash vs. bash
(I gather it is for performance reasons), I'd
appreciate (a) pointer(s) so I could better learn the
history so I don't re-hash settled issues.

--- Christopher Faylor
<[EMAIL PROTECTED]> wrote:
 
> I really don't understand why using CURDIR isn't
> the ultimate solution here.  If you can mess with
> your mount table or copy bash to sh, then
> you really should be able to also change your
> Makefile to use $(CURDIR) rather than $$PWD.



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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/



Re: pwd vs $PWD, bash, cygwin vs Linux

2005-05-04 Thread Peter Farley
WHOA there.  I think we have a slight failure to
communicate.  I am NOT the OP, I was just chiming in
on the conversation (I should have said PMFJI right up
front, apologies for forgetting that).

That said, I understand your position better now,
especially with Dave's workaround (perfectly
acceptable to me, don't know about the OP).

I certainly did NOT intend to say or to imply that 
cygwin maintainers should make any global fix to
address this issue.  I just did not understand the
reason that bash was not the default shell.  Now I do.
 Thank you (and Dave Korn) for straightening me out.

Mea maxima culpa for not being clear in my question or
my comments.

Peter

--- Christopher Faylor
<[EMAIL PROTECTED]> wrote:
> On Wed, May 04, 2005 at 08:05:40AM -0700, Peter
> Farley wrote:
> >But what if it is *not* your Makefile,
> 
> I just went back and reread this thread.  It isn't
> exactly clear that this was not your Makefile. 
> You mentioned a "test setup" which seemed
> to imply that you were using your own Makefiles.
> 
> >but someone else's, e.g.  the many GNU source
> >packages that expect bash behavior?
> 
> Most GNU packages are interested in being portable. 
> Assuming that every system out there is POSIX
> compliant is not portable.  I have a couple of
> older systems that I use which would have the same
> problems as cygwin if you use PWD in a Makefile. 
> Actually, CURDIR would also be a problem
> for them since they don't use GNU make.  Since the
> workaround is trivial it would make sense to not
> rely on PWD in any package that is supposed
> to be disseminated widely.
> 
> >Surely you don't intend that ordinary users (well,
> OK, anyone compiling
> >from a source package isn't really "ordinary")
> should modify every
> >package maintained by GNU in order to make it under
> cygwin, do you?
> 
> I would expect a GNU-maintained package to accept a
> patch to eliminate a potential problem source.
> 
> However, I surely don't intend to keep talking
> about this any further. I get the feeling that you
> want us (i.e., cygwin maintainers) to do
> something globally to solve this.  We've been using
> ash for many years and we're not about to change
> anytime soon.  You've been given enough
> alternatives now that you should be able to get
> things working.
> 
> Cygwin is not guaranteed to be 100% POSIX compliant
> or 100% linux compliant.  Sometimes we make
> tradeoffs because of Windows constraints.
> Since bash is noticeably slower than ash under
> Cygwin, we use ash as our /bin/sh.  That produces
> some problems for non-portable shell constructs.
> 
> cgf


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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/



Error using cygstart command with option arguments: "cygstart: bad argument"

2005-07-23 Thread Peter Farley
Hi all,

I tried to use cygstart to execute bash with the "-c"
option to execute a command and then terminate. 
Here's what I get:

$ cygstart bash -c echo Hi There
cygstart: bad argument -c: unknown option
$ cygstart bash -c "echo Hi There"
cygstart: bad argument -c: unknown option
$ cygstart bash "-c echo Hi There"
cygstart: bad argument -c echo Hi There: unknown
option

Is this my misunderstanding of the syntax of cygstart
or something else?

TIA for any info/RTFM/help you can provide.

Peter

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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/



Re: Error using cygstart command with option arguments: "cygstart: bad argument"

2005-07-23 Thread Peter Farley
Thank you Brian, I will try both of those. 
Fortunately none of the aruments I may need to use for
the real application will contain spaces, but it is
good advice that I will remember nonetheless.

Peter

--- Brian Dessent <[EMAIL PROTECTED]> wrote:

> Peter Farley wrote:
> 
> > I tried to use cygstart to execute bash with the
> > "-c" option to execute a command and then
> > terminate. Here's what I get:
> > 
> > $ cygstart bash -c echo Hi There
> > cygstart: bad argument -c: unknown option
> 
> The problem that you are running into is that you
> need to tell cygstart that the -c and following
> arguments are meant for the child process, and
> are not arguments to cygstart itself.  '--' is a
> standard way of doing this, which indicates to the
> program that all of the following arguments
> should not be interpreted as switches but just
> regular data.  So "cygstart -- bash -c ..." ought
> to work.
> 
> You will have to be careful with the quoting of the
> stuff after -c though.  Cygstart is designed to use
> Windows-native methods to start a process.  If
> you're using it to start a Cygwin process, and you
> want to have an argument with spaces in it (as is
> the case with any nontrivial -c) then you will have
> to be very careful with how you use quotes to
> ensure that the Cygwin->Windows->Cygwin conversion
> of the argv[] works correctly.  It would be much
> simpler to do something like: rxvt -e bash -c "echo
> whatever".
> 
> Brian


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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/



Re: Error using cygstart command with option arguments: "cygstart: bad argument"

2005-07-23 Thread Peter Farley
--- Igor Pechtchanski <[EMAIL PROTECTED]> wrote:

> Ugh, top-posting.  Reformatted.
> 
> On Sat, 23 Jul 2005, Peter Farley wrote:
> 
 
> Peter, beware that the need for quoting isn't just
> for spaces, but for any shell and cmd
> metacharacters (they are different). So, for
> example, any use of '^' or '&' or '>' needs to be
> properly quoted *after* the conversion Brian
> mentioned.
>   Igor

Thanks for the additional caution.  I will certainly
watch those quotes!

Peter

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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/



Can cygstart set the window title?

2005-07-24 Thread Peter Farley
Is it possible for cygstart to set the Windows title
of the window that it creates?  It would be very nice
to be able to specify a "--title" option to specify
that window title, rather than the default of the name
of the executed program, especially when multiple
windows are started using the same program.

Peter

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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/



Re: Error using cygstart command with option arguments: "cygstart: bad argument"

2005-07-25 Thread Peter Farley
--- Brian Dessent <[EMAIL PROTECTED]> wrote:
 
> The problem that you are running into is that you
> need to tell cygstart that the -c and following
> arguments are meant for the child process, and
> are not arguments to cygstart itself.  '--' is a
> standard way of doing this, which indicates to the
> program that all of the following arguments
> should not be interpreted as switches but just
> regular data.  So "cygstart -- bash -c ..." ought
> to work.
 

Follow-up:  Using "cygstart -- bash -c ..." did in
fact solve the "bad argument" error and do exactly
what I needed.

Thanks again for the help.

Peter



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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/



Question about coreutils common option "-"

2005-08-06 Thread Peter Farley
I thought the following would produce "ls -l" output
for the space-separated list of files selected by the
"find" options, but instead I get an error message
from "ls":

$ find a -daystart -type f -mtime 7 -printf " %p"|ls
-l -
ls: -: No such file or directory

The output from the "find" looks like this:

$ find a -daystart -type f -mtime 7 -printf " %p"
 a/list.txt a/list_0002.txt

I do not have an *ix system on which to test if this
is a Cygwin coreutils problem or a misunderstanding by
me of the operation of the "-" option.  Can you please
tell me if I am wrong about my use of the "-" option?

cygcheck -svr output pasted below, unfortunately Yahoo
mail doesn't seem to allow me to create an attachment
to send.

TIA for any help/RTFM/info you can provide.

Peter


Cygwin Configuration Diagnostics
Current System Time: Sat Aug 06 14:59:07 2005

Windows XP Home Edition Ver 5.1 Build 2600 Service
Pack 2

Path:   C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\cygwin\bin
C:\cygwin\usr\X11R6\bin
c:\WINDOWS\system32
c:\WINDOWS
c:\WINDOWS\System32\Wbem
c:\Program Files\ATI Technologies\ATI Control Panel
c:\PROGRA~1\COMMON~1\SONICS~1\
c:\Program Files\IBM\Personal Communications\
c:\Program Files\IBM\Trace Facility\
c:\Program Files\Support Tools\

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 1007(Peter)GID: 513(None)
0(root) 513(None)  
544(Administrators) 545(Users)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 1007(Peter)GID: 513(None)
0(root) 513(None)  
544(Administrators) 545(Users)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

USER = `Peter'
PWD = `/cygdrive/c/mvs38j/prt'
HOME = `/home/Peter'
MAKE_MODE = `unix'

HOMEPATH = `\Documents and Settings\Peter'
MANPATH =
`/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man::/usr/ssl/man:/usr/X11R6/man'
APPDATA = `C:\Documents and Settings\Peter\Application
Data'
HOSTNAME = `D2419R51-8400'
TERM = `cygwin'
PROCESSOR_IDENTIFIER = `x86 Family 15 Model 3 Stepping
4, GenuineIntel'
WINDIR = `C:\WINDOWS'
TEXDOCVIEW_txt = `cygstart %s'
TEXDOCVIEW_dvi = `cygstart %s'
OLDPWD = `/cygdrive/c/mvs38j/prt'
USERDOMAIN = `D2419R51-8400'
OS = `Windows_NT'
ALLUSERSPROFILE = `C:\Documents and Settings\All
Users'
!:: = `::\'
TEMP = `/cygdrive/c/DOCUME~1/Peter/LOCALS~1/Temp'
COMMONPROGRAMFILES = `C:\Program Files\Common Files'
USERNAME = `Peter'
TEXDOCVIEW_pdf = `cygstart %s'
PROCESSOR_LEVEL = `15'
FP_NO_HOST_CHECK = `NO'
SYSTEMDRIVE = `C:'
TEXDOCVIEW_html = `cygstart %s'
USERPROFILE = `C:\Documents and Settings\Peter'
CLIENTNAME = `Console'
PS1 = `\[\e]0;[EMAIL PROTECTED]
\[\e[33m\]\w\[\e[0m\]\n\$ '
LOGONSERVER = `\\D2419R51-8400'
PROCESSOR_ARCHITECTURE = `x86'
!C: = `C:\cygwin\bin'
SHLVL = `1'
PATHEXT =
`.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
HOMEDRIVE = `C:'
PROMPT = `$P$G'
COMSPEC = `C:\WINDOWS\system32\cmd.exe'
TMP = `/cygdrive/c/DOCUME~1/Peter/LOCALS~1/Temp'
SYSTEMROOT = `C:\WINDOWS'
PRINTER = `hp photosmart 1218 series'
CVS_RSH = `/bin/ssh'
PROCESSOR_REVISION = `0304'
PKG_CONFIG_PATH = `/usr/X11R6/lib/pkgconfig'
TEXDOCVIEW_ps = `cygstart %s'
INFOPATH =
`/usr/local/info:/usr/info:/usr/share/info:/usr/autotool/devel/info:/usr/autotool/stable/info:'
PROGRAMFILES = `C:\Program Files'
NUMBER_OF_PROCESSORS = `2'
SESSIONNAME = `Console'
COMPUTERNAME = `D2419R51-8400'
PCOMM_ROOT = `C:\Program Files\IBM\Personal
Communications\'
_ = `/usr/bin/cygcheck'
POSIXLY_CORRECT = `1'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus
Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus
Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus
Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x0022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus
Solutions\Cygwin\mounts v2\/
  (default) = `C:\cygwin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus
Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `C:\cygwin/bin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus
Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `C:\cygwin/lib'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus
Solutions\Cygwin\Program Options

c:  hd  NTFS152539Mb  22% CP CS UN PA FC 
d:  cd  CDFS   545Mb 100%CS UN   CDROM
e:  cd  CDFS   592Mb 100%CS UN  
Sims2EP1_1
f:  hd  FAT   1019Mb   2% CPUN   
g:  hd  FAT   2039Mb  58% CPUN   
h:  hd  FAT   2039Mb  32% CPUN   
i:  hd  FAT   2039Mb  78% CPUN   
j:  hd  FAT   2039Mb  81% CPUN   GNU
k:  hd  FAT376Mb  51% CPUN   DJGPP
l:  hd  FAT   1176Mb  94% CPUN   DATA
m:  hd  FAT643Mb  87% CPUN  
WINDOWS
n:  hd  FAT   2039Mb  99% CPUN   

Re: Question about coreutils common option "-"

2005-08-06 Thread Peter Farley
--- Brian Dessent <[EMAIL PROTECTED]> wrote:
 
> I've never heard of using '-' to ls this way.  The
> coreutils info page does list it as a common flag,
> but my interpretation of the language
> there is that it's only referring to programs that
> act as input/output filters, not as a general-
> purpose way of passing filename arguments. 
> That's why xargs exists.

How to use xargs is a definite hole in my knowledge. 
I have read the xargs info a few times, but I don't
think I have understood it yet.  I will go back to it
and try to get it this time.

> You can get ls-like output from find without any
> other programs:
> 
> find a -daystart -type f -mtime 7 -ls
> 
> If you must use an external program, the usual way
> to take the output from find and send it as
> arguments is with xargs:
> 
> find a -daystart -type f -mtime 7 | xargs ls -l

Yes, I saw that in the info for the find "-ls" option,
but in this case I am going to eventually substitute
another external program for "ls" to process the
filenames in another way.  xargs would seem to be the
correct answer for that, as you noted.

> Note that both this and your '-printf " %p"' method
> will not work for filenames that contain spaces or
> special characters.  Therefore the superior way of
> doing this is:
> 
> find a -daystart -type f -mtime 7 -print0 | xargs -0
> ls -l

Not a problem in this case, the filenames to be
processed are space-less and without any special
characters because of the program that creates them. 
Thanks anyway for the info, I will remember it.

 
> It doesn't work under linux either.  (It's the same
> coreutils code in either case.)

Understood.  Many thanks for reducing my level of
ignorance.

Peter

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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/