R: How to make cygwin redirect in UNIX mode?
Pan ruochen
panruochen@gmail.com
Tue Jun 9 02:27:00 GMT 2009
> you installed cygwin in text mode.
> So the output is DOS style, to have UNIX output
> you need to install in binmode
>
> Regards
> Marco
>
I did get one cygwin distribution which can excute scripts both in DOS
mode and in UNIX mode and output in UNIX mode. The distribution is
released in one install-shield package instead of numbers of gzip
packages with a setup program in the traditional way. I have no idea
that distribution is modified in source code level or in
configurations after installation.
Here are the messages for that distribution:
$mount
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 /cygdrive/c type user (binmode,noumount)
d: on /cygdrive/d type user (binmode,noumount)
e: on /cygdrive/e type user (binmode,noumount)
f: on /cygdrive/f type user (binmode,noumount)
g: on /cygdrive/g type user (binmode,noumount)
$cygcheck -s -v -r -h
Cygwin Win95/NT Configuration Diagnostics
Current System Time: Tue Jun 09 10:21:48 2009
Windows XP Professional 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\SecureCRT\
c:\PROGRA~1\F-Secure\SSHTRI~1
.
Output from C:\cygwin\bin\id.exe (nontsec)
UID: 500(Administrator) GID: 513(None)
513(None)
Output from C:\cygwin\bin\id.exe (ntsec)
UID: 500(Administrator) GID: 513(None)
0(root) 513(None)
544(Administrators) 545(Users)
SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS
Here's some environment variables that may affect cygwin:
HOME = `C:\cygwin\home\Administrator'
MAKE_MODE = `unix'
PWD = `/cygdrive/c'
USER = `Administrator'
Here's the rest of your environment variables:
ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
APPDATA = `C:\Documents and Settings\Administrator\Application Data'
COMMONPROGRAMFILES = `C:\Program Files\Common Files'
COMPUTERNAME = `SHARE-ALG-BJ'
COMSPEC = `C:\WINDOWS\system32\cmd.exe'
CVS_RSH = `/bin/ssh'
FP_NO_HOST_CHECK = `NO'
HOMEDRIVE = `C:'
HOMEPATH = `\Documents and Settings\Administrator'
HOSTNAME = `share-alg-bj'
INFOPATH = `/usr/local/info:/usr/info:/usr/share/info:/usr/autotool/devel/info:/usr/autotool/stable/info:'
LOGONSERVER = `\\SHARE-ALG-BJ'
MANPATH = `/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man:'
NUMBER_OF_PROCESSORS = `2'
OLDPWD = `/'
OS = `Windows_NT'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PKG_CONFIG_PATH = `/usr/X11R6/lib/pkgconfig'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 15 Model 4 Stepping 9, GenuineIntel'
PROCESSOR_LEVEL = `15'
PROCESSOR_REVISION = `0409'
PROGRAMFILES = `C:\Program Files'
PROMPT = `$P$G'
PS1 = `\[\033]0;\w\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$ '
SESSIONNAME = `Console'
SHLVL = `1'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINDOWS'
TEMP = `c:\DOCUME~1\ADMINI~1\LOCALS~1\Temp'
TERM = `cygwin'
TMP = `c:\DOCUME~1\ADMINI~1\LOCALS~1\Temp'
USERDOMAIN = `SHARE-ALG-BJ'
USERNAME = `Administrator'
USERPROFILE = `C:\Documents and Settings\Administrator'
WINDIR = `C:\WINDOWS'
_ = `/usr/bin/sh'
POSIXLY_CORRECT = `1'
Scanning registry for keys with `Cygnus' in them...
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 = 0x00000022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
(default) = `C:\cygwin'
flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
(default) = `C:\cygwin/bin'
flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
(default) = `C:\cygwin/lib'
flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options
Listing available drives...
Drv Type Size Free Flags Name
c: hd FAT32 20471Mb 70% CP UN
d: hd NTFS 19108Mb 9% CP CS UN PA FC
e: hd NTFS 21446Mb 1% CP CS UN PA FC
f: hd FAT32 15202Mb 34% CP UN 新加卷
g: fd FAT 1905Mb 64% CP UN
fd=floppy, hd=hard drive, cd=CD-ROM, net=Network Share
CP=Case Preserving, CS=Case Sensitive, UN=Unicode
PA=Persistent ACLS, FC=File Compression, VC=Volume Compression
Mount entries: these map POSIX directories to your NT drives.
-NT- -POSIX- -Type- -Flags-
C:\cygwin / system binmode
C:\cygwin/bin /usr/bin system binmode
C:\cygwin/lib /usr/lib system binmode
. /cygdrive system binmode,cygdrive
Looking to see where common programs can be found, if at all...
Found: C:\cygwin\bin\awk.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cp.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\grep.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: C:\cygwin\bin\mv.exe
Found: C:\cygwin\bin\rm.exe
Found: C:\cygwin\bin\sed.exe
Found: C:\cygwin\bin\sh.exe
Found: C:\cygwin\bin\tar.exe
Looking for various Cygnus DLLs... (-v gives version info)
61k 2003/08/08 C:\cygwin\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0
"cygbz2-1.dll" v0.0 ts=2003/8/9 14:35
7k 2003/10/18 C:\cygwin\bin\cygcrypt-0.dll - os=4.0 img=1.0 sys=4.0
"cygcrypt-0.dll" v0.0 ts=2003/10/19 15:57
831k 2003/09/20 C:\cygwin\bin\cygdb-4.1.dll - os=4.0 img=1.0 sys=4.0
"cygdb-4.1.dll" v0.0 ts=2003/9/21 5:51
1080k 2003/09/20 C:\cygwin\bin\cygdb_cxx-4.1.dll - os=4.0 img=1.0 sys=4.0
"cygdb_cxx-4.1.dll" v0.0 ts=2003/9/21 5:53
45k 2001/04/24 C:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
"cygform5.dll" v0.0 ts=2001/4/25 13:28
35k 2002/01/08 C:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
"cygform6.dll" v0.0 ts=2002/1/9 14:03
48k 2003/08/08 C:\cygwin\bin\cygform7.dll - os=4.0 img=1.0 sys=4.0
"cygform7.dll" v0.0 ts=2003/8/9 17:25
28k 2003/07/19 C:\cygwin\bin\cyggdbm-3.dll - os=4.0 img=1.0 sys=4.0
"cyggdbm-3.dll" v0.0 ts=2003/7/20 15:58
30k 2003/08/10 C:\cygwin\bin\cyggdbm-4.dll - os=4.0 img=1.0 sys=4.0
"cyggdbm-4.dll" v0.0 ts=2003/8/11 10:12
19k 2003/03/22 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
"cyggdbm.dll" v0.0 ts=2002/2/20 11:05
15k 2003/07/19 C:\cygwin\bin\cyggdbm_compat-3.dll - os=4.0 img=1.0 sys=4.0
"cyggdbm_compat-3.dll" v0.0 ts=2003/7/20 16:00
15k 2003/08/10 C:\cygwin\bin\cyggdbm_compat-4.dll - os=4.0 img=1.0 sys=4.0
"cyggdbm_compat-4.dll" v0.0 ts=2003/8/11 10:13
69k 2003/08/10 C:\cygwin\bin\cyggettextlib-0-12-1.dll - os=4.0
img=1.0 sys=4.0
"cyggettextlib-0-12-1.dll" v0.0 ts=2003/8/11 6:10
12k 2003/08/10 C:\cygwin\bin\cyggettextpo-0.dll - os=4.0 img=1.0 sys=4.0
"cyggettextpo-0.dll" v0.0 ts=2003/8/11 6:11
134k 2003/08/10 C:\cygwin\bin\cyggettextsrc-0-12-1.dll - os=4.0
img=1.0 sys=4.0
"cyggettextsrc-0-12-1.dll" v0.0 ts=2003/8/11 6:10
17k 2001/06/27 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
"cyghistory4.dll" v0.0 ts=2001/1/7 12:34
29k 2003/08/10 C:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
"cyghistory5.dll" v0.0 ts=2003/8/11 7:16
958k 2003/08/10 C:\cygwin\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0
"cygiconv-2.dll" v0.0 ts=2003/8/11 4:57
22k 2001/12/12 C:\cygwin\bin\cygintl-1.dll - os=4.0 img=1.0 sys=4.0
"cygintl-1.dll" v0.0 ts=2001/12/13 17:28
37k 2003/08/10 C:\cygwin\bin\cygintl-2.dll - os=4.0 img=1.0 sys=4.0
"cygintl-2.dll" v0.0 ts=2003/8/11 5:50
26k 2001/04/24 C:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
"cygmenu5.dll" v0.0 ts=2001/4/25 13:27
20k 2002/01/08 C:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
"cygmenu6.dll" v0.0 ts=2002/1/9 14:03
29k 2003/08/08 C:\cygwin\bin\cygmenu7.dll - os=4.0 img=1.0 sys=4.0
"cygmenu7.dll" v0.0 ts=2003/8/9 17:25
156k 2001/04/24 C:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
"cygncurses++5.dll" v0.0 ts=2001/4/25 13:29
175k 2002/01/08 C:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0
"cygncurses++6.dll" v0.0 ts=2002/1/9 14:03
226k 2001/04/24 C:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
"cygncurses5.dll" v0.0 ts=2001/4/25 13:17
202k 2002/01/08 C:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0
"cygncurses6.dll" v0.0 ts=2002/1/9 14:03
224k 2003/08/08 C:\cygwin\bin\cygncurses7.dll - os=4.0 img=1.0 sys=4.0
"cygncurses7.dll" v0.0 ts=2003/8/9 17:24
15k 2001/04/24 C:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
"cygpanel5.dll" v0.0 ts=2001/4/25 13:27
12k 2002/01/08 C:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
"cygpanel6.dll" v0.0 ts=2002/1/9 14:03
19k 2003/08/08 C:\cygwin\bin\cygpanel7.dll - os=4.0 img=1.0 sys=4.0
"cygpanel7.dll" v0.0 ts=2003/8/9 17:24
62k 2003/12/11 C:\cygwin\bin\cygpcre-0.dll - os=4.0 img=1.0 sys=4.0
"cygpcre-0.dll" v0.0 ts=2003/12/12 1:01
63k 2003/04/10 C:\cygwin\bin\cygpcre.dll - os=4.0 img=1.0 sys=4.0
"cygpcre.dll" v0.0 ts=2003/4/11 16:31
9k 2003/12/11 C:\cygwin\bin\cygpcreposix-0.dll - os=4.0 img=1.0 sys=4.0
"cygpcreposix-0.dll" v0.0 ts=2003/12/12 1:01
61k 2003/04/10 C:\cygwin\bin\cygpcreposix.dll - os=4.0 img=1.0 sys=4.0
"cygpcreposix.dll" v0.0 ts=2003/4/11 16:31
1049k 2003/11/06 C:\cygwin\bin\cygperl5_8_2.dll - os=4.0 img=1.0 sys=4.0
"cygperl5_8_2.dll" v0.0 ts=2003/11/7 19:08
22k 2002/06/08 C:\cygwin\bin\cygpopt-0.dll - os=4.0 img=1.0 sys=4.0
"cygpopt-0.dll" v0.0 ts=2002/6/9 13:45
108k 2001/06/27 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
"cygreadline4.dll" v0.0 ts=2001/1/7 12:34
148k 2003/08/10 C:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
"cygreadline5.dll" v0.0 ts=2003/8/11 7:16
61k 2003/12/03 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
"cygz.dll" v0.0 ts=2003/12/4 11:03
1100k 2004/03/18 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
"cygwin1.dll" v0.0 ts=2004/3/19 12:05
Cygwin DLL version info:
DLL version: 1.5.9
DLL epoch: 19
DLL bad signal mask: 19005
DLL old termios: 5
DLL malloc env: 28
API major: 0
API minor: 112
Shared data: 4
DLL identifier: cygwin1
Mount registry: 2
Cygnus registry name: Cygnus Solutions
Cygwin registry name: Cygwin
Program options name: Program Options
Cygwin mount registry name: mounts v2
Cygdrive flags: cygdrive flags
Cygdrive prefix: cygdrive prefix
Cygdrive default prefix:
Build date: Thu Mar 18 23:05:18 EST 2004
Shared id: cygwin1S4
Cygwin Package Information
Last downloaded files to: E:\
Last downloaded files from: E:\
Package Version
_update-info-dir 00227-1
ash 20040127-1
base-files 2.6-1
base-passwd 1.1-1
bash 2.05b-16
binutils 20040312-1
bison 20030307-1
bzip2 1.0.2-5
clear 1.0-1
crypt 1.1-1
cygutils 1.2.5-1
cygwin 1.5.9-1
diffutils 2.8.4-1
editrights 1.01-1
file 4.06-1
fileutils 4.1-2
findutils 4.1.7-4
flex 2.5.4a-3
gawk 3.1.3-4
gcc 3.3.1-3
gcc-g++ 3.3.1-3
gcc-mingw-core 20031020-1
gcc-mingw-g++ 20031020-1
gdb 20030919-1
gdbm 1.8.3-7
grep 2.5-1
groff 1.18.1-2
gzip 1.3.5-1
less 381-1
libbz2_1 1.0.2-5
libdb4.1 4.1.25-1
libgdbm 1.8.0-5
libgdbm-devel 1.8.3-7
libgdbm3 1.8.3-3
libgdbm4 1.8.3-7
libgettextpo0 0.12.1-3
libiconv2 1.9.1-3
libintl1 0.10.40-1
libintl2 0.12.1-3
libncurses5 5.2-1
libncurses6 5.2-8
libncurses7 5.3-4
libpcre 4.1-1
libpcre0 4.5-1
libpopt0 1.6.4-4
libreadline4 4.1-2
libreadline5 4.3-5
login 1.9-7
m4 1.4-1
make 3.80-1
man 1.5k-3
mingw-runtime 3.2-1
mktemp 1.5-3
more 2.11o-1
ncurses 5.3-4
perl 5.8.2-1
readline 4.3-5
sed 4.0.9-2
sh-utils 2.0.15-4
tar 1.13.25-5
tcltk 20030901-1
termcap 20021106-2
terminfo 5.3_20030726-1
texinfo 4.2-4
textutils 2.0.21-1
vim 6.2.098-1
w32api 2.5-1
which 1.5-2
xorg-x11-devel 6.7.0.0-4
zlib 1.2.1-1
--
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/
More information about the Cygwin
mailing list