cygpath behaviour changed

2002-11-10 Thread Lynn Wilson
I've just installed the latest cygwin.dll and bash. An existing script no longer 
works.  I tracked it to the following:

cygpath --path --windows "c:\WINNT"
produces c;c:\WINNT  (note the leading c;)

cygpath --windows "c:\WINNT"
produces the correct c:\WINNT

cygpath --path --windows /c/WINNT/
produces the correct c:\WINNT

my mounts are:
c:\program files on /PF type system (binmode)
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /c type system (binmode)
r: on /r type system (binmode)
w: on /w type system (binmode)

Lynn


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



ZoneAlarm and OpenSSH

2003-01-02 Thread Lynn Wilson
ZoneAlarm Pro contains code that is designed to stop trojans by popping up a 
dialog window and asking the computer user whether a given process should be 
allowed to have access to the internet.  The user can elect to deny the access 
attempt or to accept it AND the user can also elect to remember the answer for 
this particular process and automatically allow it access in any future attempts.

A while back I began noticing that occasionally (not always!) I would get a 
popup when running ssh asking whether I should allow access to Object 80002839. 
 The actual number varies each time.  Since it is not the same number, I can 
not tell ZoneAlarm to always allow it to have access.

Does anyone have a workaround for this problem?  I have scripts that I want to 
run from cron on a remote machine that does not have a regular human operator. 
I also need parts of ZoneAlarm that prevent outside access except from known IP 
addresses.  Windows that pop-up and halt operations until a human interacts with 
it are not a good thing.

Where changes made to OpenSSH recently that caused this to occur or was I just 
not paying attention?  Suggestions welcomed.

Lynn


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



annoying problem with 'mv'

2003-01-31 Thread Lynn Wilson
My understanding of the way that 'mv' works is that it will try to RENAME the 
file or directory in question provided the source and destination are on the 
same partition otherwise it will do a COPY.

If I mv (in the sense of renaming) a large directory that is buried deep in some 
 other directory, it will occur very quickly.  If that same directory happens 
to be rooted at /c, it will take a very long time because it appears to be doing 
a copy.

This has been going on for a long time, but currently I'm running the latest of 
almost everything on a Win2k pro box.

My mount tables are:
c:\program files on /PF type system (binmode)
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /c type system (binmode)
f: on /cvs type system (binmode)
g: on /kits type system (binmode)
e: on /e type user (binmode,noumount)
n: on /n type user (binmode,noumount)

This works:
cd /c/mystuff
mv OldDir NewDir

An example of the failure would be:
cd /c
mv OldDir NewDir

Is there a reason for this behavior?

Thanks.
Lynn


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



'hostname' now returns lower case

2003-02-07 Thread Lynn Wilson
I'm now running cygwin 1.3.19-1.  I've recently noticed that a bash script that 
previously worked is failing.  The problem is that the 'hostname' command used 
to return an upper case machine name.  It now returns a lower case name.

Which is correct?  I modified my script to accept either case.

Lynn


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



'man' shows escape sequences after updating to docbook_xsl 1.64.1-1

2003-12-23 Thread Lynn Wilson
It seems that a few months ago the man pages were showing the ESC[1m etc. escape 
sequences in a bash shell. The problem was quickly fixed.

I downloaded docbook_xsl 1.64.1-1 yesterday and the problem is back.  I also 
downloaded a few X-modules.  One of these modules caused the 'man' problem to 
re-appear.

Thanks for the good work.
Lynn


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


bash expansion question

2002-03-11 Thread Lynn Wilson

The man page for bash says:
Enclosing  characters  in single quotes preserves the lit-
eral value of each character within the quotes.  A  single
quote  may not occur between single quotes, even when pre-
ceded by a backslash.

If I write the following bash script( test.bash ):
#!/usr/bin/bash
echo Argument is $1

If I execute this script in a directory that does NOT constain
any perl (*.pl) files:

test.bash '*.pl'
I get as expected:  Argument is *.pl

However if there IS a perl file present I get:
Argument is filename.pl

BTW, I get exactly the same behavior if I use double quotes.
Am I missing something here?  I need to pass a literal pattern that
may contain wildcard characters into a bash script and not have the
shell expand it.

Thanks.
Lynn




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




RE: Setup's download directory structure

2002-04-17 Thread Lynn Wilson

I'm unhappy with the new structure as well.  I also wrote a perl script
(similar to clean_setup.pl) that plows through the download and removes
earlier copies of things in order to save disk space.

That is the ONLY reason I'm unhappy with the new structure.

I'd be REALLY happy if setup.exe had a option that would remove earlier
copies of files in whatever directory structure happens to exist.

lynn

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Question for perl gurus: what creates /bin/{HEAD|GET|POST}?

2002-09-27 Thread Lynn Wilson

alias head="/bin/head"

works for me from the bash command line.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




File name completion on symbolic links

2003-09-29 Thread Lynn Wilson
This is a very minor issue and it may be just a Bash problem, but...

When I use Bash to do file name completion (using Tab) on a DIRECTORY 
that is a symlink I do not get the trailing slash '/'.

If it's a real directory, the TAB results in the completion of the 
directory name with an appended slash.  If it's a symlink, I get the 
directory name but NO slash.

This is the part of my mount table that may be of interest:

c:\program files on /PF type system (binmode)
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /c type system (binmode)
d: on /d type system (binmode,noumount)
cd /c
c> ls -ald Sources Public
drwxr-xr-x+   4 lrwilso  mkgroup  4096 Aug 13 11:28 public/
lrwxrwxrwx1 lrwilso  mkgroup   100 Aug 13 09:52 Sources -> 
/d/Sources

ls pub  yields  "ls public/"
ls  Sou yields "ls Sources"
any insight?

Lynn





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


as long as we're talking of changing setup.exe...

2002-01-02 Thread Lynn Wilson

Every time I run setup, it continues to ask if I want to 'create desktop 
icon' and if I want to 'Add to Start Menu'.

Once I have answer this, I wish it would default to the some 
non-annoying value.  Even the answer from the previous install would be 
fine.  I could tell it 'No' to both questions and then never be bothered 
with it again unless I opted to.

Just a friendly observation...

Lynn


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: vim and color

2002-01-10 Thread Lynn Wilson

/usr/bin/vi (aka /bin/vi) supports syntax highlighting based on the file 
extension of the file being edited.  The files at 
/usr/share/vim/vim60/syntax/*.vim define the highlighting (vim60 may vary 
according to your version).

The very last line of my ~/.vimrc is 'syntax enable'.  This does the trick for 
me.  Color syntax highlighting based on file extension is great!

Lynn


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




rm fails to remove symbolic links to directories

2005-04-13 Thread Lynn Wilson
Just upgraded to the latest versions moments ago.
I had created a symbolic link to a directory some time ago.
If I try and remove the symlink using Bash I get the following error:
rm: cannot remove directory `x/': Is a directory
If I then empty the contents of the directory and repeat the 'rm x' command 
I get the same error.  Trying 'rm -df x' also failed.

I saw several symlink changes last week that effected how 'ant' (ant.sh) no 
longer worked when $ANT_HOME was a symlink to the real path.  Changing to the 
real path rather than the symlink was a work-around for that problem.

Is there a work-around for not being able to remove symbolic links to 
directories?
Thanks.
Lynn

--
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: permissions for chmod on network drives

2005-05-25 Thread Lynn Wilson


I too have seen my CVS share stop working within the past two weeks.  I 
haven't had much time to work on it but I noticed a few things.  
Although I can create files on the share (touch foo) and delete them (rm 
foo) I get a 'permission denied' if I try to do a chmod 777 foo.


The share is on an XP-Home SP2 machine that has been working for many 
months.  I regularly download Cygwin updates so I'm never surprised by 
occasional gotchas.


lynn



--
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: permissions for chmod on network drives

2005-05-25 Thread Lynn Wilson

As Corinna suggested, the latest snapshot does in fact fix the problem.
Thanks.
Lynn

--
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: Source for Tree command

2008-12-15 Thread Lynn Wilson

You can try using the windows one at:   c:/WINDOWS/system32/tree.com

Or you can roll you own as shown below which will also work on *nix machines.
enjoy.
Lynn

=

#!/bin/bash

# This scripts graphically displays a file directory structure
# Does NOT work with file names containing embedded spaces!
#
#  Written by Lynn R. Wilson  March 2001
#

depth=0
let MaxDepth=1

function TreeHelper()
{
local savethis
savethis="$thisfile"
local saveindent
local printed
printed=

if [ -n "$ShowFiles" ]; then
for file in $* ; do
thisfile="$thisfile/$file"
if [ -f "$thisfile" ]; then
printed="1"
echo -e "$indent|-- $file"# add * 
at end if you want...
fi
thisfile="$savethis"
done
fi

for file in $* ; do

if [ "$file" = "CVS" ] && [ -n "$ignoreCVS" ]; then
continue
fi

thisfile="$thisfile/$file"
if [ -d "$thisfile" ]; then
if [ -L "$file" ]; then
link=$( ls -al "$file" )
link=${link##*>} # keep everything 
after last '>'
echo -e  "$indent|-- $file/ (symlink)-> $link"
else
echo -e  "$indent|-- $file/"
fi
printed="1"
saveindent=$indent
indent="$indent|   "
if [ ! -L "$file" ] || [ -n "$FollowLinks" ]; then
   let depth=$depth+1
   if [ $depth -lt $MaxDepth ] ; then
TreeHelper $( command ls "$thisfile" )
   else
echo -e "$indent..."
   fi
   let depth=$depth-1
fi
indent=$saveindent
fi
thisfile=$savethis
done

if [ -n "$printed" ]; then
echo -e "$indent"
fi
}


# parse the command arguments
# can also be done with ( while getopts ":ip:" opt; do... )
while true; do

if [ "$1" = "-f" ]; then
ShowFiles=1
shift
continue
fi

if [ "$1" = "-L" ]; then
FollowLinks=1
shift
continue
fi

if [ "$1" = "-d" ]; then
shift
MaxDepth=$1
shift
continue
fi

if [ "$1" = "-C" ]; then
ignoreCVS=1
shift
continue
fi

if [ "$1" = "-h" ]; then
echo 'Usage:  tree [-f] [-L] [-C] [-d depth] [ path ]'
echo '-f also shows files, -L follows symbolic links, -C 
ignores CVS'
echo
exit
fi

break
done



if [ -z "$1" ] ; then
here=$( pwd )
else
here=$1
fi

if [ ! -d "$here" ]; then
echo Not a Directory! $here
exit 1
fi

echo Tree rooted at: $here

thisfile=$here
TreeHelper $( command ls "$here" )

exit 0

# end of script





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