public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Gary Johnson <garyjohn@spocom.com>
To: cygwin@cygwin.com
Subject: Re: Newbie Questions
Date: Tue, 04 Feb 2014 20:52:00 -0000	[thread overview]
Message-ID: <20140204205041.GA16017@phoenix> (raw)
In-Reply-To: <1898639722.6893470.1391541591920.JavaMail.root@ptd.net>

On 2014-02-04, mrushton wrote:
> I am loving Cygwin.  
> 
> I have been reading the manuals and documentation and have some
> newbie questions. 

These are all general Unix/Linux questions, not specific to Cygwin,
and are therefor not appropriate for discussion on the cygwin list.

That said, I don't like dusting people off, so...

> 1)  When I go to execute a script, do I just type the name of it
>     or do i have to do a ./NameOfScript ? 

If the command is not specified by a path name, and if the shell
doesn't find a built-in command, alias or function that matches the
command name, it searches PATH for a file of that name.  PATH does
not normally contain "." and should not, for security reasons.
Therefore, if you wish the execute a script in the current
directory, and the current directory is not in your PATH, you have
to specify the path to the script.

> 2)  I am trying to do an Alias of the Clear Command ... in my
>     bashrc I has an alias for clear to do a printf "\033c".   Well
>     it does not seem to work from my scripts, but works from shell
>     prompt.
>
>     Is this a path issue ?  

No.  Aliases are not exported and hence do not appear in the
environment of commands.

> 3)  I am still trying to figure out how to open a termial window
>     and have a menu script always run. 
>
>     Should I put this in my .profile or is there a better way to
>     do this ?  

I'm not sure you should do this at all, but if you want to try such
a thing for a while, put it in your ~/.bashrc and execute it only if
~/.bashrc is sourced from an interactive shell.  Some people
determine this by checking if $PS1 is set while others check for the
presence of "i" in $-.

All of these questions are answered in the man page for bash, or
whatever shell you are using.  If you don't want to read the whole
thing, just search for keywords from your questions.  If you have
further questions, you will have to find a different forum/list in
which to ask them.

Regards,
Gary


--
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:[~2014-02-04 20:52 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04 19:20 mrushton
2014-02-04 20:52 ` Gary Johnson [this message]
2014-02-04 20:55 ` Marco Atzeri
2014-02-05 18:25   ` Mike Rushton
2014-02-05 18:30     ` Larry Hall (Cygwin)
2014-02-05 21:17       ` Warren Young
2014-02-05 21:30         ` Warren Young
2014-02-05 22:20           ` Andrey Repin
2014-02-05 22:35             ` Andrey Repin
2014-02-06  0:39             ` Warren Young
2014-02-06  1:05               ` Andrey Repin
2014-02-06  1:15                 ` Warren Young
2014-02-06  8:20                   ` Andrey Repin
2014-02-06 20:34                     ` Warren Young
2014-02-05 21:44         ` Mike Rushton
2014-02-05 22:20           ` Andrey Repin
2014-02-05 22:05         ` Andrey Repin
  -- strict thread matches above, loose matches on Subject: below --
2002-07-06 21:26 Newbie questions rick
2002-02-13 12:00 newbie questions marcin pakula
1999-08-25  7:53 Newbie questions John Wiersba
1999-08-31 23:49 ` John Wiersba
1999-08-25  5:02  Clark Sims 
1999-08-25  5:08 ` Kim Poulsen
1999-08-31 23:49   ` Kim Poulsen
1999-08-25  8:06 ` Keith Starsmeare
1999-08-31 23:49   ` Keith Starsmeare
1999-08-31 23:49 `  Clark Sims 
1999-08-24  8:08 John Wiersba
1999-08-31 23:49 ` John Wiersba
1999-08-24  6:26  Clark Sims 
1999-08-24  6:35 ` Larry Hall (RFK Partners, Inc)
1999-08-31 23:49   ` Larry Hall (RFK Partners, Inc)
1999-08-24 13:06 ` Michael Hirmke
1999-08-31 23:49   ` Michael Hirmke
1999-08-31 23:49 `  Clark Sims 
1999-01-31 23:52 Jan Hubicka
     [not found] <199803221444.GAA20073@cygnus.com>
1998-04-02  9:35 ` Michael Hirmke
1998-04-02  9:35 Earnie Boyd
1998-02-28 23:38 Nagle, Adrian
1998-02-09  5:30 Earnie Boyd
1998-02-06  8:16 bash questions Eric Horowitz
1998-02-06 16:53 ` Newbie questions Silas S. Brown
1998-02-07  6:45   ` Benjamin Riefenstahl
1998-02-05  9:14 tar (four questions) (NBY) Earnie Boyd
1998-02-06  1:27 ` Newbie questions Francois Felix Ingrand
1998-02-06 11:19   ` Fergus Henderson

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=20140204205041.GA16017@phoenix \
    --to=garyjohn@spocom.com \
    --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).