public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Eliot Moss <moss@cs.umass.edu>
To: cygwin@cygwin.com
Subject: Re: Exclude System entries with "ls" or "find"
Date: Wed, 19 Dec 2018 01:10:00 -0000	[thread overview]
Message-ID: <d2a92d08-d31e-e823-d298-b7e23f032d7c@cs.umass.edu> (raw)
In-Reply-To: <6d2b6327-96f3-9079-9cce-691999f63933@gmail.com>

On 12/18/2018 10:51 AM, cyg Simple wrote:
> On 12/18/2018 7:58 AM, Eliot Moss wrote:
>> However, you can run DOS attrib from Cygwin, just like any Windows program,
>> and parse its output.  So it would be possible to use a combination of Windows
>> and Cygwin tools to do what you're seeking, though not necessarily with high
>> efficiency, etc.
>>
> 
> That depends on the Windows program and whether or not it the data gets to Cygwin.

I was referring to processing the textual output of the DOS command program 'attrib'.
Cygwin has a wide range of POSIX style text processing tools and scripting languages.
This is clearly possible.

For example, if I run:

    attrib | grep '^...S'

I get the output from attrib (all files in the current directory), filtered by those
lines where the fourth character is S, which is the lines for the file with the SYS
attribute set.  Further parsing could extract the file name, and then (if you like)
you can apply cygpath to it to convert the name from Windows syntax to POSIX, etc.

Best - EM

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

  reply	other threads:[~2018-12-18 16:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18  8:13 Steven Penny
2018-12-18 12:58 ` Corinna Vinschen
2018-12-18 15:51   ` Eliot Moss
2018-12-18 16:19     ` cyg Simple
2018-12-19  1:10       ` Eliot Moss [this message]
2018-12-19 10:06   ` Brian Inglis
2018-12-19 12:20     ` Corinna Vinschen
2018-12-19 12:53       ` Andrey Repin
2018-12-19 13:37         ` Eliot Moss
2018-12-19 14:50           ` Corinna Vinschen
2018-12-19 15:19             ` Andrey Repin
2018-12-19 18:25               ` Corinna Vinschen
2018-12-19 20:57               ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d2a92d08-d31e-e823-d298-b7e23f032d7c@cs.umass.edu \
    --to=moss@cs.umass.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).