public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Polley Christopher W" <PolleyChristopherW@JohnDeere.com>
To: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Subject: RE: cygwin.bat suggestions
Date: Wed, 10 Jul 2002 11:33:00 -0000	[thread overview]
Message-ID: <718198F862F1D411B10F0002A50A4DB1059FEA3D@e90wwce3.dx.deere.com> (raw)


> From: Jon LaBadie [mailto:jcyg@jgcomp.com]
> On Wed, Jul 10, 2002 at 12:06:09PM +0100, David Starks-Browning wrote:
> > On Tuesday 9 Jul 02, Dantin writes:
> > >       How do I use rxvt in conjuction with the cygwin do 
> I need a switch for
> > > the batch file? If so what would that switch be? Or do I 
> need to modify the
> > > batch file itself?
> > 
> > If you search the email archives you should find numerous 
> examples of
> > how people invoke rxvt.  I use a shortcut as follows:
> > 
> > 	C:\cygwin\bin\rxvt.exe -e bash --login
> 
> I'm looking for sample cygwin.bat files.
> I tried a search of the archives, what a mistake, information 
> overload.
> But after scanning several hundred messages, no samples.
> 
> One thing I would like is to have a single cygwin.bat service multiple
> users with different shell preferences.  Currently I'm forcing ksh
> as follows:
> 
>     $ cat /cygwin.bat
>     @echo off
> 
>     C:
>     chdir \cygwin\bin
>  
>     set SHELL=/bin/ksh
>  
>     rxvt --loginShell -geometry 108x32 -fn 10x20 -sr +ut
> 
> One thing I would like to do is replace "set SHELL=/bin/ksh" with
> 
>     SHELL=$(grep "^${USER}:" /etc/passwd | cut -d: -f7)
>     : ${SHELL:=/bin/ksh}
> 
> Of course, that is shell programming, not windows batch file 
> programming.
> I'm good at the former, not the latter :(
> 
> Any suggestion for picking up the shell preference of the 
> user invoking
> the cygwin.bat file?
How about:

------>8--------
@echo off

C:
chdir \cygwin\bin

rem set SHELL to user's shell (from /etc/passwd)
bash -c "echo -n 'set SHELL='> temp_setShellEnvVar.bat"
grep "^%USERNAME%:" /etc/passwd | cut -d: -f7 >> temp_setShellEnvVar.bat
call temp_setShellEnvVar.bat
del temp_setShellEnvVar.bat
 
rxvt --loginShell -geometry 108x32 -fn 10x20 -sr +ut

------>8--------

(window's 'echo' is unable to write to a line without a crlf at the end, and
AFAIK, there's no backtick equivalent in batch programming)

Warm Regards,
Chris


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

             reply	other threads:[~2002-07-10 17:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-10 11:33 Polley Christopher W [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-14  4:24 Vince Hoffman
2002-07-11 11:26 Polley Christopher W
2002-07-11 11:05 Polley Christopher W
2002-07-11  5:23 Vince Hoffman
2002-07-11  6:03 ` Mark Himsley
2002-07-12 10:03   ` Jim.George
2002-07-12 15:17     ` Mark Himsley
2002-07-12 22:22       ` Jim George
2002-07-13  0:06         ` Christopher Faylor
2002-07-10  7:48 Robinow, David
2002-07-10  7:40 Jon LaBadie
2002-07-11 13:07 ` Chris Game
2002-08-21 12:39 ` Soren A
2002-08-21 17:59   ` Soren A

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=718198F862F1D411B10F0002A50A4DB1059FEA3D@e90wwce3.dx.deere.com \
    --to=polleychristopherw@johndeere.com \
    --cc=cygwin@cygwin.com \
    --cc=cygwin@cygwin.org \
    /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).