public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Jose I. Cabrera" <cabrera@wrc.xerox.com>
To: earnie_boyd@yahoo.com
Cc: cygwin users <gnu-win32@cygnus.com>
Subject: Re: bash scripts and cd's....
Date: Fri, 27 Nov 1998 15:14:00 -0000	[thread overview]
Message-ID: <365EE681.8B99B542@wrc.xerox.com> (raw)
In-Reply-To: <19981127124056.27728.rocketmail@send106.yahoomail.com>

Thanks Earnie!  that worked....!

Earnie Boyd wrote:
> 
> ---"Jose I. Cabrera" <cabrera@wrc.xerox.com> wrote:
> 
> Hi, Jose.
> 
> >
> > I have NT4SP3 running Cygnus v20.
> >
> > I have a script:
> >
> > --- begin script ---
> > #! /bin/sh
> >
> > cd k:
> > cd NormalDirectory
> > cd "Directory with a spaces in between"
> >
> > exit 0
> > --- end script ---
> >
> > This executes ok.  But, when I do a ls, the files echo'ed are the
> > files from HOME.  why?  If I do this manually, I could get to
> > "Directory with a spaces in between".  Any idea why?
> >
> 
> For example purposes I'll call the script ys.  When ys is executed it
> is executed in a child process.  The cd happens in the child not the
> parent.  The parent never sees the cd that happens in the child process.
> 
> To have the parent issue the cd commands you need to use the "source"
> command AKA ".".  E.G.:
> 
> bash$ source ys
> 
> or
> 
> bash$ . ys
> 
> This will have the effect you want and leave the parent in path\ with\
> spaces.
> 
> ==
> -                        \\||//
> -------------------o0O0--Earnie--0O0o-------------------
> --                earnie_boyd@yahoo.com               --
> -- http://www.freeyellow.com/members5/gw32/index.html --
> ----------------------ooo0O--O0ooo----------------------
> 
> PS: Newbie's, you should visit my page.
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com

-- 

Hasta pronto.....!!!
Y como dice mi pa'i, "Mecedora!!"

(((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))
!!                 jose.....El Dominicano Americano Ausente.    !!
!!    These are my opinions and not my employer's.              !!
(((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

  reply	other threads:[~1998-11-27 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-27  4:40 Earnie Boyd
1998-11-27 15:14 ` Jose I. Cabrera [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-09-07  4:10 Installshield lro
1998-09-08  7:53 ` Colors Jose I. Cabrera
1998-09-09 19:41   ` Colors Alex Rezinsky
1998-11-25 12:51     ` bash scripts and cd's Jose I. Cabrera

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=365EE681.8B99B542@wrc.xerox.com \
    --to=cabrera@wrc.xerox.com \
    --cc=earnie_boyd@yahoo.com \
    --cc=gnu-win32@cygnus.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).