public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* newbie questions
@ 2002-02-13 12:00 marcin pakula
  0 siblings, 0 replies; 44+ messages in thread
From: marcin pakula @ 2002-02-13 12:00 UTC (permalink / raw)
  To: cygwin

Hi, 
I got couple of questions and I'd appreciate your help ;o)) 
I'm new to cygwin and pretty new to linux. 
I was looking for .profile, .bashrc and .inputrc 
but i can't find them how come ???
In User manual it says that Ican set %HOME% in properties but i got 
no such 
thing....
Finally I got confused about binary and text mode :o( 
The best thing would be to get emacs I figure, but then where from ( 
what 
distro ) and how to install it ???
Where is /dev with: 
tty, ttySA0 etc.. 
CAn i just load normal linux packages such as setserial ??? if yes 
than i386 ?? 
/thanks 
/marcin 
PS I'm not in the list so I'd appreciate direct email 
PS2.. is there a IRC channel with all of you guys ??

Thanks in advance 
/marcin pakula



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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-06  8:20                   ` Andrey Repin
@ 2014-02-06 20:34                     ` Warren Young
  0 siblings, 0 replies; 44+ messages in thread
From: Warren Young @ 2014-02-06 20:34 UTC (permalink / raw)
  To: Andrey Repin

On 2/6/2014 01:13, Andrey Repin wrote:
> Greetings, Warren Young!
>
>>> [C:\home\Daemon]$ bash -c ./foo.sh
>
>> That's not the same command I gave you.  -c changes how bash.exe
>> interprets the following parameter.
>
> According to `man bash', that's the correct command to execute scripts with
> bash.

Are you trolling?

$ man bash

SYNOPSIS
        bash [options] [file]

...

ARGUMENTS
        If arguments remain after option processing, and neither the -c
        nor the -s  option  has  been supplied, the first argument is
        assumed to be the name of a file containing shell commands.



In other words, bash behaves exactly as I said originally, and Windows 
Explorer isn't wrong to call Bash with just the name of a script, when 
you tell it that all *.sh open with bash.exe.

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-06  1:15                 ` Warren Young
@ 2014-02-06  8:20                   ` Andrey Repin
  2014-02-06 20:34                     ` Warren Young
  0 siblings, 1 reply; 44+ messages in thread
From: Andrey Repin @ 2014-02-06  8:20 UTC (permalink / raw)
  To: Warren Young, cygwin

Greetings, Warren Young!

>> [C:\home\Daemon]$ bash -c ./foo.sh

> That's not the same command I gave you.  -c changes how bash.exe 
> interprets the following parameter.

According to `man bash', that's the correct command to execute scripts with
bash.

> It matters, because when you right-click a *.sh file in Windows 
> Explorer, say Open With, then tell Explorer to use bash.exe to open such 
> files now and in the future, it isn't going to stick -c in the command 
> for you.

> If you did change the file association in the registry, adding -c, that 
> still isn't going to help because Windows Explorer is going to pass the 
> full Windows-style path to bash.exe in place of the %1.  Plus you still 
> have the PATH issues I brought up in my previous email.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 06.02.2014, <12:13>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-06  1:05               ` Andrey Repin
@ 2014-02-06  1:15                 ` Warren Young
  2014-02-06  8:20                   ` Andrey Repin
  0 siblings, 1 reply; 44+ messages in thread
From: Warren Young @ 2014-02-06  1:15 UTC (permalink / raw)
  To: Andrey Repin

On 2/5/2014 18:00, Andrey Repin wrote:
>
> [C:\home\Daemon]$ bash -c ./foo.sh

That's not the same command I gave you.  -c changes how bash.exe 
interprets the following parameter.

It matters, because when you right-click a *.sh file in Windows 
Explorer, say Open With, then tell Explorer to use bash.exe to open such 
files now and in the future, it isn't going to stick -c in the command 
for you.

If you did change the file association in the registry, adding -c, that 
still isn't going to help because Windows Explorer is going to pass the 
full Windows-style path to bash.exe in place of the %1.  Plus you still 
have the PATH issues I brought up in my previous email.

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-06  0:39             ` Warren Young
@ 2014-02-06  1:05               ` Andrey Repin
  2014-02-06  1:15                 ` Warren Young
  0 siblings, 1 reply; 44+ messages in thread
From: Andrey Repin @ 2014-02-06  1:05 UTC (permalink / raw)
  To: Warren Young, cygwin

Greetings, Warren Young!

> On 2/5/2014 15:07, Andrey Repin wrote:
>>
>>> But if you associate .sh with bash.exe, then double-click that script
>>> from Windows Explorer, it won't work right, since bash.exe will try to
>>> run it as a shell script.
>>
>> Have you actually tried that?

> Yep.

>> Try it, you'll be surprised.

> I did try it, before sending the previous message pair.

> Save the attached file as foo.sh, then run it with "bash foo.sh", rather 
> than "./foo.sh".  This is what happens when you associate *.sh with 
> bash.exe in Windows Explorer.

[C:\home\Daemon]$ bash -c ./foo.sh
Hello from Perl!

[C:\home\Daemon]$

> Bash tries to interpret the file as a shell script, despite the shebang 
> line.  This is because Bash doesn't do the shebang handling, exec() 
> does, and Bash treats passed file names as names of shell scripts.  It 
> runs them directly, not through exec().

Perhaps, we have different bash'es...


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 06.02.2014, <04:54>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  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
  1 sibling, 1 reply; 44+ messages in thread
From: Warren Young @ 2014-02-06  0:39 UTC (permalink / raw)
  To: Andrey Repin

[-- Attachment #1: Type: text/plain, Size: 2332 bytes --]

On 2/5/2014 15:07, Andrey Repin wrote:
>
>> But if you associate .sh with bash.exe, then double-click that script
>> from Windows Explorer, it won't work right, since bash.exe will try to
>> run it as a shell script.
>
> Have you actually tried that?

Yep.

> Try it, you'll be surprised.

I did try it, before sending the previous message pair.

Save the attached file as foo.sh, then run it with "bash foo.sh", rather 
than "./foo.sh".  This is what happens when you associate *.sh with 
bash.exe in Windows Explorer.

Bash tries to interpret the file as a shell script, despite the shebang 
line.  This is because Bash doesn't do the shebang handling, exec() 
does, and Bash treats passed file names as names of shell scripts.  It 
runs them directly, not through exec().

When you say "bash foo.sh" on the attached file, it complains:

     foo.sh: line 2: use: command not found
     Unable to initialize device PRN

Then it sleeps for 2 seconds, since Bash and Perl both interpret line 4 
the same way, if you ignore the minor semantic difference ";\n" makes to 
Bash.

There is one small but critical difference in behavior when you do this 
by double-clicking foo.sh from Windows Explorer, with *.sh associated 
with Cygwin's bash.exe.  That is, it only pauses on line 4 if your 
Cygwin bin directory is in the Windows system PATH, since otherwise, 
bash.exe can't find sleep.exe.

Instead of adding Cygwin's bin directory to the Windows PATH, you can 
fix this with a minor registry hack.  Open

     HKCU\Software\Classes\sh_auto_file\shell\open\command

Change the default value to something like:

     "C:\cygwin32\bin\bash.exe" -l "%1"

Adjust c:\cygwin32 as needed.

This makes bash.exe a login shell, which forces it to run its startup 
scripts before running the script passed to it, so PATH gets set the 
same way it does for an interactive shell.

This doesn't make bash.exe send foo.sh to perl.exe, though.  To do that, 
you have to change the key's default value to:

     "C:\cygwin32\bin\bash.exe" -l -c 'exec `cygpath -u "%1"`'

A registry hack that involves triply-nested quotes seems like a long way 
to go to make Windows Explorer run files the same way Bash would 
interactively.

Plus, it only helps when you're attempting to deceive Bash.

My motto: Don't lie to computers; they find ways to get even.

[-- Attachment #2: foo.sh --]
[-- Type: application/x-shellscript, Size: 67 bytes --]

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-05 22:20           ` Andrey Repin
@ 2014-02-05 22:35             ` Andrey Repin
  2014-02-06  0:39             ` Warren Young
  1 sibling, 0 replies; 44+ messages in thread
From: Andrey Repin @ 2014-02-05 22:35 UTC (permalink / raw)
  To: Andrey Repin

Greetings, Andrey Repin!

>>> I'd bet there are more Bourne shell scripts in the world with no
>>> extension at all than .sh.

>> ....That said, if you're wanting to be able to double-click on a shell 
>> script icon in Windows and associate that with Cygwin's bash.exe, you 
>> *will* need to pick a file name extension, since that's how Windows 
>> determines what's in a file.

> Not necessarily. Especially not, when using ShellExecute(Ex)?...

-ShellExecute
+CreateProcess

Sorry.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 06.02.2014, <02:21>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-05 21:44         ` Mike Rushton
@ 2014-02-05 22:20           ` Andrey Repin
  0 siblings, 0 replies; 44+ messages in thread
From: Andrey Repin @ 2014-02-05 22:20 UTC (permalink / raw)
  To: Mike Rushton, cygwin

Greetings, Mike Rushton!

> Right ... the extension is a windows thing.

Not really. It's a human thing, that let you tell the intended meaning of the
file at a glance.

> Most of the bourne shell scripts i have come across have no extension.
> Some have the Shebang line ... while others don't have it.

Ones that not have it are scripts not intended for direct invocation (like
these normally residing in /etc/default/*)

> I am still in the planing stages ... I am not sure if I am going to use 
> an extension or not.

> It might be a good idea to use .sh and then you would know that it is a 
> script.

I'm using this little wrapper to start scripts by shebang line.

-->8-------->8-------->8-------->8-------->8-------->8-------->8------
C:\Programs\CygWin\bin\cygwrap.sh
#! /bin/sh
if [ -z "$1" ]; then
  echo "No command given, breaking off." 1>&2
  exit 1
fi

CMDNAME="$( cygpath -au "$1")"
shift

env "$CMDNAME" $*
-->8-------->8-------->8-------->8-------->8-------->8-------->8------

along with association

$ assoc .pl
.pl=unixshell.script

$ assoc .sh
.sh=unixshell.script

(etc.)

$ ftype unixshell.script
unixshell.script="C:\Programs\Cygwin\bin\env.exe" /bin/cygwrap.sh "%1" %*


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 06.02.2014, <02:08>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  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
  0 siblings, 2 replies; 44+ messages in thread
From: Andrey Repin @ 2014-02-05 22:20 UTC (permalink / raw)
  To: Warren Young, cygwin

Greetings, Warren Young!

> On 2/5/2014 14:17, Warren Young wrote:
>>
>> I'd bet there are more Bourne shell scripts in the world with no
>> extension at all than .sh.

> ....That said, if you're wanting to be able to double-click on a shell 
> script icon in Windows and associate that with Cygwin's bash.exe, you 
> *will* need to pick a file name extension, since that's how Windows 
> determines what's in a file.

Not necessarily. Especially not, when using ShellExecute(Ex)?...

> .sh is indeed the standard choice when you must use a file extension for 
> a Bourne shell script, for whatever reason.

> These two features can interact in odd ways.

> Say you have a Perl script, which you have misleadingly named foo.sh. 
>  From a bash shell, you type:

>         $ ./foo.sh

> The Perl script will run as intended, despite the name.

> But if you associate .sh with bash.exe, then double-click that script 
> from Windows Explorer, it won't work right, since bash.exe will try to 
> run it as a shell script.

Have you actually tried that?
Try it, you'll be surprised.

> Perl isn't close enough in syntax to Bourne shell for this to work for
> anything but trivial (or very tricky!) scripts. 

> What you've done here is substitute Windows Explorer for exec(), so you
> don't get the shebang handling built into exec().

Try it yourself... you'll be surprised.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 06.02.2014, <02:02>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-05 21:17       ` Warren Young
  2014-02-05 21:30         ` Warren Young
  2014-02-05 21:44         ` Mike Rushton
@ 2014-02-05 22:05         ` Andrey Repin
  2 siblings, 0 replies; 44+ messages in thread
From: Andrey Repin @ 2014-02-05 22:05 UTC (permalink / raw)
  To: Warren Young, cygwin

Greetings, Warren Young!

>>> does cygwin have a preferred extension for scripts ?
>>
>> No, the extension can be whatever you like.  By convention, bash/sh scripts
>> with extensions use ".sh".

> I'd bet there are more Bourne shell scripts in the world with no 
> extension at all than .sh.

If you read his reply carefully, you will notice he explicitly stated "with
extension"...

> For the most part, Mike, POSIXy systems like Cygwin and Linux use magic 
> bytes[1] and the shebang line[2] to figure out what is contained in a 
> given file, rather than the file name.


> [1] http://goo.gl/5F9P33
> [2] http://goo.gl/XjINSi


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 06.02.2014, <02:01>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-05 21:17       ` Warren Young
  2014-02-05 21:30         ` Warren Young
@ 2014-02-05 21:44         ` Mike Rushton
  2014-02-05 22:20           ` Andrey Repin
  2014-02-05 22:05         ` Andrey Repin
  2 siblings, 1 reply; 44+ messages in thread
From: Mike Rushton @ 2014-02-05 21:44 UTC (permalink / raw)
  To: cygwin

Right ... the extension is a windows thing.

Most of the bourne shell scripts i have come across have no extension.
Some have the Shebang line ... while others don't have it.

I am still in the planing stages ... I am not sure if I am going to use 
an extension or not.

It might be a good idea to use .sh and then you would know that it is a 
script.





On 2/5/2014 4:17 PM, Warren Young wrote:
> On 2/5/2014 11:30, Larry Hall (Cygwin) wrote:
>> On 2/5/2014 1:25 PM, Mike Rushton wrote:
>>> does cygwin have a preferred extension for scripts ?
>>
>> No, the extension can be whatever you like.  By convention, bash/sh 
>> scripts
>> with extensions use ".sh".
>
> I'd bet there are more Bourne shell scripts in the world with no 
> extension at all than .sh.
>
> For the most part, Mike, POSIXy systems like Cygwin and Linux use 
> magic bytes[1] and the shebang line[2] to figure out what is contained 
> in a given file, rather than the file name.
>
>
> [1] http://goo.gl/5F9P33
> [2] http://goo.gl/XjINSi
>
>
> -- 
> 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
>
>


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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-05 21:17       ` Warren Young
@ 2014-02-05 21:30         ` Warren Young
  2014-02-05 22:20           ` Andrey Repin
  2014-02-05 21:44         ` Mike Rushton
  2014-02-05 22:05         ` Andrey Repin
  2 siblings, 1 reply; 44+ messages in thread
From: Warren Young @ 2014-02-05 21:30 UTC (permalink / raw)
  To: cygwin

On 2/5/2014 14:17, Warren Young wrote:
>
> I'd bet there are more Bourne shell scripts in the world with no
> extension at all than .sh.

....That said, if you're wanting to be able to double-click on a shell 
script icon in Windows and associate that with Cygwin's bash.exe, you 
*will* need to pick a file name extension, since that's how Windows 
determines what's in a file.

.sh is indeed the standard choice when you must use a file extension for 
a Bourne shell script, for whatever reason.

These two features can interact in odd ways.

Say you have a Perl script, which you have misleadingly named foo.sh. 
 From a bash shell, you type:

	$ ./foo.sh

The Perl script will run as intended, despite the name.

But if you associate .sh with bash.exe, then double-click that script 
from Windows Explorer, it won't work right, since bash.exe will try to 
run it as a shell script.  Perl isn't close enough in syntax to Bourne 
shell for this to work for anything but trivial (or very tricky!) scripts.

What you've done here is substitute Windows Explorer for exec(), so you 
don't get the shebang handling built into exec().

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-05 18:30     ` Larry Hall (Cygwin)
@ 2014-02-05 21:17       ` Warren Young
  2014-02-05 21:30         ` Warren Young
                           ` (2 more replies)
  0 siblings, 3 replies; 44+ messages in thread
From: Warren Young @ 2014-02-05 21:17 UTC (permalink / raw)
  To: cygwin

On 2/5/2014 11:30, Larry Hall (Cygwin) wrote:
> On 2/5/2014 1:25 PM, Mike Rushton wrote:
>> does cygwin have a preferred extension for scripts ?
>
> No, the extension can be whatever you like.  By convention, bash/sh scripts
> with extensions use ".sh".

I'd bet there are more Bourne shell scripts in the world with no 
extension at all than .sh.

For the most part, Mike, POSIXy systems like Cygwin and Linux use magic 
bytes[1] and the shebang line[2] to figure out what is contained in a 
given file, rather than the file name.


[1] http://goo.gl/5F9P33
[2] http://goo.gl/XjINSi


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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-05 18:25   ` Mike Rushton
@ 2014-02-05 18:30     ` Larry Hall (Cygwin)
  2014-02-05 21:17       ` Warren Young
  0 siblings, 1 reply; 44+ messages in thread
From: Larry Hall (Cygwin) @ 2014-02-05 18:30 UTC (permalink / raw)
  To: cygwin

On 2/5/2014 1:25 PM, Mike Rushton wrote:
> Thanks for all the help.
>
> What I am trying to do is convert some Korn Shell scripts to bash to run
> under Cygwin.
>
> I am wondering,  does cygwin have a preferred extension for scripts ? It
> probably does not matter.   Some of the scripts had .ksh on the end of them.
> I want to make everything uniform now that I am moving to Cygwin.

No, the extension can be whatever you like.  By convention, bash/sh scripts
with extensions use ".sh".


-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-04 20:55 ` Marco Atzeri
@ 2014-02-05 18:25   ` Mike Rushton
  2014-02-05 18:30     ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 44+ messages in thread
From: Mike Rushton @ 2014-02-05 18:25 UTC (permalink / raw)
  To: cygwin

Thanks for all the help.

What I am trying to do is convert some Korn Shell scripts to bash to run 
under Cygwin.

I am wondering,  does cygwin have a preferred extension for scripts ?  
It  probably does not matter.   Some of the scripts had .ksh on the end 
of them.
I want to make everything uniform now that I am moving to Cygwin.






On 2/4/2014 3:55 PM, Marco Atzeri wrote:
>
>
> On 04/02/2014 20:19, mrushton wrote:
>> I am loving Cygwin.
>>
>> I have been reading the manuals and documentation and have some 
>> newbie questions.
>>
>>
>> 1)  When I go to execute a script, do I just type the name of it or 
>> do i have to do a ./NameOfScript ?
>
> just the name if it is located in one of the PATH directories as any 
> other command. instead "./NameOfScript" if you want to execute a 
> script or a command not in the PATH
>
> For your own script " ~/bin" is a nice location
>
> This is a generic Unix FAQ.
>
>
>> 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 ?
>
> How you call the script ?
>
> See on "info bash" at "6.2 Bash Startup Files"
>
>
>> 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 ?
>
> Do you need a standalone run, so the terminal close after, or you need 
> to drop to bash after the script ?
>
> Your solution is fine for the second case, while on the first
> you need to adapt the
>
> "mintty.exe /bin/bash -l" to "mintty.exe /bin/bash -C yourscript"
>
>
>> Thanks for all the work of the Cygwin team.
>>
>
> -- 
> 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
>
>


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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-04 19:20 Newbie Questions mrushton
  2014-02-04 20:52 ` Gary Johnson
@ 2014-02-04 20:55 ` Marco Atzeri
  2014-02-05 18:25   ` Mike Rushton
  1 sibling, 1 reply; 44+ messages in thread
From: Marco Atzeri @ 2014-02-04 20:55 UTC (permalink / raw)
  To: cygwin



On 04/02/2014 20:19, mrushton wrote:
> I am loving Cygwin.
>
> I have been reading the manuals and documentation and have some newbie questions.
>
>
> 1)  When I go to execute a script, do I just type the name of it or do i have to do a ./NameOfScript ?

just the name if it is located in one of the PATH directories as any 
other command. instead "./NameOfScript" if you want to execute a script 
or a command not in the PATH

For your own script " ~/bin" is a nice location

This is a generic Unix FAQ.


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

How you call the script ?

See on "info bash" at "6.2 Bash Startup Files"


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

Do you need a standalone run, so the terminal close after, or you need 
to drop to bash after the script ?

Your solution is fine for the second case, while on the first
you need to adapt the

"mintty.exe /bin/bash -l" to "mintty.exe /bin/bash -C yourscript"


> Thanks for all the work of the Cygwin team.
>

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie Questions
  2014-02-04 19:20 Newbie Questions mrushton
@ 2014-02-04 20:52 ` Gary Johnson
  2014-02-04 20:55 ` Marco Atzeri
  1 sibling, 0 replies; 44+ messages in thread
From: Gary Johnson @ 2014-02-04 20:52 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Newbie Questions
@ 2014-02-04 19:20 mrushton
  2014-02-04 20:52 ` Gary Johnson
  2014-02-04 20:55 ` Marco Atzeri
  0 siblings, 2 replies; 44+ messages in thread
From: mrushton @ 2014-02-04 19:20 UTC (permalink / raw)
  To: cygwin

I am loving Cygwin.  

I have been reading the manuals and documentation and have some newbie questions. 


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

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 ?  

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 ?  

Thanks for all the work of the Cygwin team. 

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Newbie questions
@ 2002-07-06 21:26 rick
  0 siblings, 0 replies; 44+ messages in thread
From: rick @ 2002-07-06 21:26 UTC (permalink / raw)
  To: cygwin

Hi all ,

        I was wondering If I can make a program under Linux , using gcc 
and GTK , and the same program to be ported to Windows or viceversa ?

Please guys , I'm a newbie in this matter , so I need a litle directions 
on this topic  ....

I 'm a confused , What I like to know is : What is better to work ? Gtk+ 
, QT  , Vxwindows ?

I would like to work with the most easiest cross platform library .....

Can I run an Stand alone (.exe) developed with cygwin under windows  ? 

Can I use , Dev++ for example  under windows , and gcc under linux ?

Thanks guys , sorry for my ignorance ,

Regards

Rick





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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Newbie questions
  1999-08-24  6:26  Clark Sims 
  1999-08-24  6:35 ` Larry Hall (RFK Partners, Inc)
  1999-08-24 13:06 ` Michael Hirmke
@ 1999-08-31 23:49 `  Clark Sims 
  2 siblings, 0 replies; 44+ messages in thread
From:  Clark Sims  @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin

 I just loaded cygwin onto my computer and I have
several questions.

1) is there a way to make a case insensitive file mask?
For example, my c source files appear as a mixture of
.c and .C suffixes. ls *.c returns a different set of
files than ls *.C

2) How does bash search for commands? I am used to DOS/
Windozs programming, where the dos command prompt
searches the path. When I am running bash however,
I must type in the full path of any executable that
I want to run. Is there some way of avoiding having
to type in the full path?

3) I would like to use cp to keep source files in
aggrement on sepparate machines. I have tried the
following command:
cp -v -u -r d:/cclib g:
where d: is a drive on my laptop, and g: is a drive
on my desktop. The problem is that the timestamps on
all the copied files are set to the current system 
files. I would like the timestamps to be the same
on all the copied files. This way when I copy back
from g:
cp -v -u -r g:/cclib d:
I get only the files that I have worked on during
the day. They way things stand, all of the files
I copied in the morning are copied back a second 
time. Is there a way to make the timestamps match?

Thanks in Advance,

Clark Sims


--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.
#include <stdio.h>
#include <string.h>
#include <conio.h>

void append_input( const char *npt, char *pg, int ln, int mxln, int mxwdth);
/*
assumes: 
   ln > 0
   mxwdth > 0
   strlen( npt) < mxwdth
   ln < mxln
   npt can't contain a newline character
changes:
   characters between pg[ln*mxwdth] and pg[ln*mxwdth+strlen(npt)]
description:
   appends npt to pg, at line ln
*/

void dump_input( const char *pg, int nmln, int mxln, int mxwdth, int wait);
/*
assumes:
   mxln >= nmln  > 0
   pg contains vallid null terminated strings, with a stride of mxwdth
changes:
   stdout
description:
   this dumps pg to stdout
   if wait is true, than getch is called, which causes
   the program to pause untill a key is hit from the keyboard
*/
 
#define MAXWIDTH 258

char input[MAXWIDTH+1];

const char *_usage = "usage: mypg [-p=25]\n";
int main( int argc, const char* argv[])
{
int p=25, i;
char *pg, *pinput;

if (argc > 1)
{
  if (argc!=2)
    {
      goto usage;
    }
  if (memcmp( argv[1], "-p=", 3) != 0)
    {
      goto usage;
    }
  p = atol( argv[1]+3);
  if (p<=0)
    {
      printf( "p must be > 0\n");
      goto usage;
    }
}
  
pg = (char *)malloc( p*MAXWIDTH);
if (pg==NULL){
  printf( "out of memory\n");
  return 2;
}

i = 0;
do {
  input[0] = 0;
  pinput = gets( input);
  
  if (pinput != NULL || input[0]!=0)
    {
      append_input( input, pg, i, p, MAXWIDTH);
      i++;
    }
    
  if (i%p == 0 || pinput==NULL)
    {
      dump_input( pg, i, p, MAXWIDTH, pinput!=NULL);
      i = 0;
    }
} while (pinput != NULL);
      
return 0;

usage:

printf( _usage);

return 1;
}

void append_input( 
   const char *npt, 
   char *pg, 
   int ln, 
   int mxln, 
   int mxwdth)
{
char *funcname = "append_input";	
long nptlen;

if (npt==NULL)
   {
      printf( "npt==NULL in %s\n", funcname);
      exit( 1);
   }

if (pg==NULL)
   {
      printf( "pg==NULL in %s\n", funcname);
      exit( 1);
   }

if (ln < 0)
   {
	   printf( "ln<= in %s\n", funcname);
	   exit( 1);
   }

if (mxln < 0)
   {
	   printf( "mxln<= in %s\n", funcname);
	   exit( 1);
   }

if (mxwdth < 0)
   {
	   printf( "mxwdth<= in %s\n", funcname);
	   exit( 1);
   }

nptlen = strlen( npt);

if (nptlen >= mxwdth)
   {
      printf( "strlen(input) > maxwidth in %s\n", funcname);
      exit( 1);
   }
   
strcpy( pg+ln*mxwdth, npt);

}    

void dump_input( 
   const char *pg, 
   int nmln, 
   int mxln, 
   int mxwdth, 
   int wait)
{
int i;

if (nmln > mxln)
  {
    printf( "error, nmln > mxln in dump_input\n");
    exit( 1);
  }

for (i=0;i<nmln;i++)
  {
    puts( pg+i*mxwdth);
  }
  
fflush( NULL);

if (wait)
   {
      getch();
   }
}






^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions
  1999-08-24 13:06 ` Michael Hirmke
@ 1999-08-31 23:49   ` Michael Hirmke
  0 siblings, 0 replies; 44+ messages in thread
From: Michael Hirmke @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin

Hi Clark,

[...]
>1) is there a way to make a case insensitive file mask?

put the following line into your .bashrc:

shopt -s nocaseglob

[...]
>2) How does bash search for commands? I am used to DOS/
>Windozs programming, where the dos command prompt
>searches the path. When I am running bash however,

It is nearly the same in bash, besides it doesn't
search the current directory unless you tel it to do so.
You have an environment variable named PATH (upper case!),
whose elements are separated by ":" instead of ";" as in
DOS. Each element represents a directory, which is searched
for executables.

[...]
>3) I would like to use cp to keep source files in
[...]
>time. Is there a way to make the timestamps match?

touch //d/*

>
>Thanks in Advance,
>
>Clark Sims

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://aquarius.franken.de/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* RE: Newbie questions
  1999-08-24  8:08 John Wiersba
@ 1999-08-31 23:49 ` John Wiersba
  0 siblings, 0 replies; 44+ messages in thread
From: John Wiersba @ 1999-08-31 23:49 UTC (permalink / raw)
  To: ' Clark Sims ', 'cygwin@sourceware.cygnus.com'

> 1) is there a way to make a case insensitive file mask?
> For example, my c source files appear as a mixture of
> .c and .C suffixes. ls *.c returns a different set of
> files than ls *.C

shopt -s nocaseglob or shopt -u nocaseglob depending on which setting you
want

see bash man page and search for "insensitive"

> 2) How does bash search for commands? I am used to DOS/
> Windozs programming, where the dos command prompt
> searches the path. When I am running bash however,
> I must type in the full path of any executable that
> I want to run. Is there some way of avoiding having
> to type in the full path?

export PATH=DIR1/DIR2:DIR3:.

note that . must be specified explicitly

> 3) I would like to use cp to keep source files in
> aggrement on sepparate machines. I have tried the
> following command:
> cp -v -u -r d:/cclib g:
> where d: is a drive on my laptop, and g: is a drive
> on my desktop. The problem is that the timestamps on
> all the copied files are set to the current system 
> files. I would like the timestamps to be the same
> on all the copied files. This way when I copy back
> from g:
> cp -v -u -r g:/cclib d:
> I get only the files that I have worked on during
> the day. They way things stand, all of the files
> I copied in the morning are copied back a second 
> time. Is there a way to make the timestamps match?

you almost had it (just read a little more in the cp man page): use -p

> Thanks in Advance,

You're welcome :-)

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* RE: Newbie questions
  1999-08-25  7:53 John Wiersba
@ 1999-08-31 23:49 ` John Wiersba
  0 siblings, 0 replies; 44+ messages in thread
From: John Wiersba @ 1999-08-31 23:49 UTC (permalink / raw)
  To: ' Clark Sims ', 'cygwin@sourceware.cygnus.com'

> -----Original Message-----
> From: Clark Sims [ mailto:clarksimsgnu@my-Deja.com ]

<lots of SNIPs>

> How do I "see the bash man page"?

See below

> echo $PATH produces:
> 
> /cygnus/CYGWIN~1/H-I586~1/bin:/cygnus/CYGWIN~1/H-I586~1/bin:d:
> /fsf/emacs-19.34/bin:d:/fsf/bin:/WINNT/system32:/WINNT:d:/CCLI
> B/libnt:d:/WATCOM/BINNT:d:/WATCOM/BINW:d:/util:.:d:/PROGRA~1/ULTRAEDT
> 
> d:/fsf/emacs-19.34/bin contains emacs.exe
> but I can't run emacs unless I specify the full path

As another poster hinted, the colon is a path element separator, so
d:/anything won't work.  Try
mount

mkdir /d
mount d: /d

and then put /d/anything in your path.  There's more info about mount
scattered throughout the documentation/FAQ.

> d:/fsf/bin contains man.exe but I can't run man.
> Is the cygwin install supposed to contain man.exe?

I downloaded the man package from the franken ftp site, but if you already
have another man, then maybe that will work.  I believe the man pages are
included in the install, but man.exe is not, for some reason.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions
  1999-08-25  5:08 ` Kim Poulsen
@ 1999-08-31 23:49   ` Kim Poulsen
  0 siblings, 0 replies; 44+ messages in thread
From: Kim Poulsen @ 1999-08-31 23:49 UTC (permalink / raw)
  To: egcs; +Cc: 'cygwin@sourceware.cygnus.com'

Clark Sims wrote:
> echo $PATH produces:
> /cygnus/CYGWIN~1/H-I586~1/bin:/cygnus/CYGWIN~1/H-I586~1/bin:d:/fsf/emacs-19.34/bin:d:/fsf/bin:/WINNT/system32:/WINNT:d:/CCLIB/libnt:d:/WATCOM/BINNT:d:/WATCOM/BINW:d:/util:.:d:/PROGRA~1/ULTRAEDT

I don't believe that ...bin:d:/fsf/emacs-19.34/bin:d:... is interpreted
the way you want it to be interpreted.  Try removing the 'd:' from your
path.
 
> d:/fsf/emacs-19.34/bin contains emacs.exe
> but I can't run emacs unless I specify the full path
> d:/fsf/bin contains man.exe but I can't run man.
> Is the cygwin install supposed to contain man.exe?

See problem above.
-- 
 Kim Poulsen, B.Sc.E.E, System Developer HW
 Ericsson Telebit A/S     Tel: + 45 86 28 81 76
 Fabriksvej 11            Fax: + 45 86 28 81 86
 DK-8260 Viby J           E-mail: info@tbit.dk
 Denmark                  URL: http://www.tbit.dk/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* RE: Newbie questions
  1999-08-25  5:02  Clark Sims 
  1999-08-25  5:08 ` Kim Poulsen
  1999-08-25  8:06 ` Keith Starsmeare
@ 1999-08-31 23:49 `  Clark Sims 
  2 siblings, 0 replies; 44+ messages in thread
From:  Clark Sims  @ 1999-08-31 23:49 UTC (permalink / raw)
  To: ' Clark Sims ', 'cygwin@sourceware.cygnus.com',
	John Wiersba

 
--

On Tue, 24 Aug 1999 11:07:09   John Wiersba wrote:
>> 1) is there a way to make a case insensitive file mask?
>> For example, my c source files appear as a mixture of
>> .c and .C suffixes. ls *.c returns a different set of
>> files than ls *.C
>
>shopt -s nocaseglob or shopt -u nocaseglob depending on which setting you
>want
>

This works great!

>see bash man page and search for "insensitive"
>

man bash produces:
bash: man: command not found

How do I "see the bash man page"?

>> 2) How does bash search for commands? I am used to DOS/
>> Windozs programming, where the dos command prompt
>> searches the path. When I am running bash however,
>> I must type in the full path of any executable that
>> I want to run. Is there some way of avoiding having
>> to type in the full path?
>
>export PATH=DIR1/DIR2:DIR3:.
>
>note that . must be specified explicitly
>

echo $PATH produces:

/cygnus/CYGWIN~1/H-I586~1/bin:/cygnus/CYGWIN~1/H-I586~1/bin:d:/fsf/emacs-19.34/bin:d:/fsf/bin:/WINNT/system32:/WINNT:d:/CCLIB/libnt:d:/WATCOM/BINNT:d:/WATCOM/BINW:d:/util:.:d:/PROGRA~1/ULTRAEDT

d:/fsf/emacs-19.34/bin contains emacs.exe
but I can't run emacs unless I specify the full path

d:/fsf/bin contains man.exe but I can't run man.
Is the cygwin install supposed to contain man.exe?

>> 3) I would like to use cp to keep source files in
>> aggrement on sepparate machines. I have tried the
>> following command:
>> cp -v -u -r d:/cclib g:
>> where d: is a drive on my laptop, and g: is a drive
>> on my desktop. The problem is that the timestamps on
>> all the copied files are set to the current system 
>> files. I would like the timestamps to be the same
>> on all the copied files. This way when I copy back
>> from g:
>> cp -v -u -r g:/cclib d:
>> I get only the files that I have worked on during
>> the day. They way things stand, all of the files
>> I copied in the morning are copied back a second 
>> time. Is there a way to make the timestamps match?
>
>you almost had it (just read a little more in the cp man page): use -p
>

cp -v -u -r -p g:/cclib d:

This works great. Thanks



--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions
  1999-08-24  6:35 ` Larry Hall (RFK Partners, Inc)
@ 1999-08-31 23:49   ` Larry Hall (RFK Partners, Inc)
  0 siblings, 0 replies; 44+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 1999-08-31 23:49 UTC (permalink / raw)
  To:  Clark Sims ; +Cc: cygwin@sourceware.cygnus.com

At 06:26 AM 8/24/99 -0700, you wrote:
>Content-Type: text/plain; charset=us-ascii
>Content-Length: 1332
>Content-Transfer-Encoding: 7bit
>
> I just loaded cygwin onto my computer and I have
>several questions.
>
>1) is there a way to make a case insensitive file mask?
>For example, my c source files appear as a mixture of
>.c and .C suffixes. ls *.c returns a different set of
>files than ls *.C


There's an option in bash to make it case-insensitive.  I don't remember 
what it is though.  See the docs or check the mail archives.  If you look
in the archives, you'll need to look back a bit.  The topic was last
brought up > 3 months ago if I remember correctly...


>2) How does bash search for commands? I am used to DOS/
>Windozs programming, where the dos command prompt
>searches the path. When I am running bash however,
>I must type in the full path of any executable that
>I want to run. Is there some way of avoiding having
>to type in the full path?


Put the paths where your utilities are in your path.





Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX
                                        (508) 560-1285 - cell phone


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions
  1999-08-25  8:06 ` Keith Starsmeare
@ 1999-08-31 23:49   ` Keith Starsmeare
  0 siblings, 0 replies; 44+ messages in thread
From: Keith Starsmeare @ 1999-08-31 23:49 UTC (permalink / raw)
  To: Clark Sims; +Cc: cygwin

Clark Sims wrote:
> echo $PATH produces:
> 
> /cygnus/CYGWIN~1/H-I586~1/bin:/cygnus/CYGWIN~1/H-I586~1/bin:d:/fsf/emacs-19.34/bin:d:/fsf/bin:/WINNT/system32:/WINNT:d:/CCLIB/libnt:d:/WATCOM/BINNT:d:/WATCOM/BINW:d:/util:.:d:/PROGRA~1/ULTRAEDT
> 
> d:/fsf/emacs-19.34/bin contains emacs.exe
> but I can't run emacs unless I specify the full path

Use //d/ instead of d:/ in your PATH. Your PATH looks very confusing
otherwise as : is used as the field separator.

Of course, //d/ support is going to be phased out in favour of using
mount points. So use:

  mkdir /d
  mount d: /d

Then your PATH would just need to include /d/fsf/emacs-19.34/bin

Keith

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions
  1999-08-25  5:02  Clark Sims 
  1999-08-25  5:08 ` Kim Poulsen
@ 1999-08-25  8:06 ` Keith Starsmeare
  1999-08-31 23:49   ` Keith Starsmeare
  1999-08-31 23:49 `  Clark Sims 
  2 siblings, 1 reply; 44+ messages in thread
From: Keith Starsmeare @ 1999-08-25  8:06 UTC (permalink / raw)
  To: Clark Sims; +Cc: cygwin

Clark Sims wrote:
> echo $PATH produces:
> 
> /cygnus/CYGWIN~1/H-I586~1/bin:/cygnus/CYGWIN~1/H-I586~1/bin:d:/fsf/emacs-19.34/bin:d:/fsf/bin:/WINNT/system32:/WINNT:d:/CCLIB/libnt:d:/WATCOM/BINNT:d:/WATCOM/BINW:d:/util:.:d:/PROGRA~1/ULTRAEDT
> 
> d:/fsf/emacs-19.34/bin contains emacs.exe
> but I can't run emacs unless I specify the full path

Use //d/ instead of d:/ in your PATH. Your PATH looks very confusing
otherwise as : is used as the field separator.

Of course, //d/ support is going to be phased out in favour of using
mount points. So use:

  mkdir /d
  mount d: /d

Then your PATH would just need to include /d/fsf/emacs-19.34/bin

Keith

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* RE: Newbie questions
@ 1999-08-25  7:53 John Wiersba
  1999-08-31 23:49 ` John Wiersba
  0 siblings, 1 reply; 44+ messages in thread
From: John Wiersba @ 1999-08-25  7:53 UTC (permalink / raw)
  To: ' Clark Sims ', 'cygwin@sourceware.cygnus.com'

> -----Original Message-----
> From: Clark Sims [ mailto:clarksimsgnu@my-Deja.com ]

<lots of SNIPs>

> How do I "see the bash man page"?

See below

> echo $PATH produces:
> 
> /cygnus/CYGWIN~1/H-I586~1/bin:/cygnus/CYGWIN~1/H-I586~1/bin:d:
> /fsf/emacs-19.34/bin:d:/fsf/bin:/WINNT/system32:/WINNT:d:/CCLI
> B/libnt:d:/WATCOM/BINNT:d:/WATCOM/BINW:d:/util:.:d:/PROGRA~1/ULTRAEDT
> 
> d:/fsf/emacs-19.34/bin contains emacs.exe
> but I can't run emacs unless I specify the full path

As another poster hinted, the colon is a path element separator, so
d:/anything won't work.  Try
mount

mkdir /d
mount d: /d

and then put /d/anything in your path.  There's more info about mount
scattered throughout the documentation/FAQ.

> d:/fsf/bin contains man.exe but I can't run man.
> Is the cygwin install supposed to contain man.exe?

I downloaded the man package from the franken ftp site, but if you already
have another man, then maybe that will work.  I believe the man pages are
included in the install, but man.exe is not, for some reason.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions
  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 `  Clark Sims 
  2 siblings, 1 reply; 44+ messages in thread
From: Kim Poulsen @ 1999-08-25  5:08 UTC (permalink / raw)
  To: egcs; +Cc: 'cygwin@sourceware.cygnus.com'

Clark Sims wrote:
> echo $PATH produces:
> /cygnus/CYGWIN~1/H-I586~1/bin:/cygnus/CYGWIN~1/H-I586~1/bin:d:/fsf/emacs-19.34/bin:d:/fsf/bin:/WINNT/system32:/WINNT:d:/CCLIB/libnt:d:/WATCOM/BINNT:d:/WATCOM/BINW:d:/util:.:d:/PROGRA~1/ULTRAEDT

I don't believe that ...bin:d:/fsf/emacs-19.34/bin:d:... is interpreted
the way you want it to be interpreted.  Try removing the 'd:' from your
path.
 
> d:/fsf/emacs-19.34/bin contains emacs.exe
> but I can't run emacs unless I specify the full path
> d:/fsf/bin contains man.exe but I can't run man.
> Is the cygwin install supposed to contain man.exe?

See problem above.
-- 
 Kim Poulsen, B.Sc.E.E, System Developer HW
 Ericsson Telebit A/S     Tel: + 45 86 28 81 76
 Fabriksvej 11            Fax: + 45 86 28 81 86
 DK-8260 Viby J           E-mail: info@tbit.dk
 Denmark                  URL: http://www.tbit.dk/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* RE: Newbie questions
@ 1999-08-25  5:02  Clark Sims 
  1999-08-25  5:08 ` Kim Poulsen
                   ` (2 more replies)
  0 siblings, 3 replies; 44+ messages in thread
From:  Clark Sims  @ 1999-08-25  5:02 UTC (permalink / raw)
  To: ' Clark Sims ', 'cygwin@sourceware.cygnus.com',
	John Wiersba

 
--

On Tue, 24 Aug 1999 11:07:09   John Wiersba wrote:
>> 1) is there a way to make a case insensitive file mask?
>> For example, my c source files appear as a mixture of
>> .c and .C suffixes. ls *.c returns a different set of
>> files than ls *.C
>
>shopt -s nocaseglob or shopt -u nocaseglob depending on which setting you
>want
>

This works great!

>see bash man page and search for "insensitive"
>

man bash produces:
bash: man: command not found

How do I "see the bash man page"?

>> 2) How does bash search for commands? I am used to DOS/
>> Windozs programming, where the dos command prompt
>> searches the path. When I am running bash however,
>> I must type in the full path of any executable that
>> I want to run. Is there some way of avoiding having
>> to type in the full path?
>
>export PATH=DIR1/DIR2:DIR3:.
>
>note that . must be specified explicitly
>

echo $PATH produces:

/cygnus/CYGWIN~1/H-I586~1/bin:/cygnus/CYGWIN~1/H-I586~1/bin:d:/fsf/emacs-19.34/bin:d:/fsf/bin:/WINNT/system32:/WINNT:d:/CCLIB/libnt:d:/WATCOM/BINNT:d:/WATCOM/BINW:d:/util:.:d:/PROGRA~1/ULTRAEDT

d:/fsf/emacs-19.34/bin contains emacs.exe
but I can't run emacs unless I specify the full path

d:/fsf/bin contains man.exe but I can't run man.
Is the cygwin install supposed to contain man.exe?

>> 3) I would like to use cp to keep source files in
>> aggrement on sepparate machines. I have tried the
>> following command:
>> cp -v -u -r d:/cclib g:
>> where d: is a drive on my laptop, and g: is a drive
>> on my desktop. The problem is that the timestamps on
>> all the copied files are set to the current system 
>> files. I would like the timestamps to be the same
>> on all the copied files. This way when I copy back
>> from g:
>> cp -v -u -r g:/cclib d:
>> I get only the files that I have worked on during
>> the day. They way things stand, all of the files
>> I copied in the morning are copied back a second 
>> time. Is there a way to make the timestamps match?
>
>you almost had it (just read a little more in the cp man page): use -p
>

cp -v -u -r -p g:/cclib d:

This works great. Thanks



--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions
  1999-08-24  6:26  Clark Sims 
  1999-08-24  6:35 ` 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 
  2 siblings, 1 reply; 44+ messages in thread
From: Michael Hirmke @ 1999-08-24 13:06 UTC (permalink / raw)
  To: cygwin

Hi Clark,

[...]
>1) is there a way to make a case insensitive file mask?

put the following line into your .bashrc:

shopt -s nocaseglob

[...]
>2) How does bash search for commands? I am used to DOS/
>Windozs programming, where the dos command prompt
>searches the path. When I am running bash however,

It is nearly the same in bash, besides it doesn't
search the current directory unless you tel it to do so.
You have an environment variable named PATH (upper case!),
whose elements are separated by ":" instead of ";" as in
DOS. Each element represents a directory, which is searched
for executables.

[...]
>3) I would like to use cp to keep source files in
[...]
>time. Is there a way to make the timestamps match?

touch //d/*

>
>Thanks in Advance,
>
>Clark Sims

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://aquarius.franken.de/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* RE: Newbie questions
@ 1999-08-24  8:08 John Wiersba
  1999-08-31 23:49 ` John Wiersba
  0 siblings, 1 reply; 44+ messages in thread
From: John Wiersba @ 1999-08-24  8:08 UTC (permalink / raw)
  To: ' Clark Sims ', 'cygwin@sourceware.cygnus.com'

> 1) is there a way to make a case insensitive file mask?
> For example, my c source files appear as a mixture of
> .c and .C suffixes. ls *.c returns a different set of
> files than ls *.C

shopt -s nocaseglob or shopt -u nocaseglob depending on which setting you
want

see bash man page and search for "insensitive"

> 2) How does bash search for commands? I am used to DOS/
> Windozs programming, where the dos command prompt
> searches the path. When I am running bash however,
> I must type in the full path of any executable that
> I want to run. Is there some way of avoiding having
> to type in the full path?

export PATH=DIR1/DIR2:DIR3:.

note that . must be specified explicitly

> 3) I would like to use cp to keep source files in
> aggrement on sepparate machines. I have tried the
> following command:
> cp -v -u -r d:/cclib g:
> where d: is a drive on my laptop, and g: is a drive
> on my desktop. The problem is that the timestamps on
> all the copied files are set to the current system 
> files. I would like the timestamps to be the same
> on all the copied files. This way when I copy back
> from g:
> cp -v -u -r g:/cclib d:
> I get only the files that I have worked on during
> the day. They way things stand, all of the files
> I copied in the morning are copied back a second 
> time. Is there a way to make the timestamps match?

you almost had it (just read a little more in the cp man page): use -p

> Thanks in Advance,

You're welcome :-)

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions
  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 `  Clark Sims 
  2 siblings, 1 reply; 44+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 1999-08-24  6:35 UTC (permalink / raw)
  To:  Clark Sims ; +Cc: cygwin@sourceware.cygnus.com

At 06:26 AM 8/24/99 -0700, you wrote:
>Content-Type: text/plain; charset=us-ascii
>Content-Length: 1332
>Content-Transfer-Encoding: 7bit
>
> I just loaded cygwin onto my computer and I have
>several questions.
>
>1) is there a way to make a case insensitive file mask?
>For example, my c source files appear as a mixture of
>.c and .C suffixes. ls *.c returns a different set of
>files than ls *.C


There's an option in bash to make it case-insensitive.  I don't remember 
what it is though.  See the docs or check the mail archives.  If you look
in the archives, you'll need to look back a bit.  The topic was last
brought up > 3 months ago if I remember correctly...


>2) How does bash search for commands? I am used to DOS/
>Windozs programming, where the dos command prompt
>searches the path. When I am running bash however,
>I must type in the full path of any executable that
>I want to run. Is there some way of avoiding having
>to type in the full path?


Put the paths where your utilities are in your path.





Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX
                                        (508) 560-1285 - cell phone


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Newbie questions
@ 1999-08-24  6:26  Clark Sims 
  1999-08-24  6:35 ` Larry Hall (RFK Partners, Inc)
                   ` (2 more replies)
  0 siblings, 3 replies; 44+ messages in thread
From:  Clark Sims  @ 1999-08-24  6:26 UTC (permalink / raw)
  To: cygwin

 I just loaded cygwin onto my computer and I have
several questions.

1) is there a way to make a case insensitive file mask?
For example, my c source files appear as a mixture of
.c and .C suffixes. ls *.c returns a different set of
files than ls *.C

2) How does bash search for commands? I am used to DOS/
Windozs programming, where the dos command prompt
searches the path. When I am running bash however,
I must type in the full path of any executable that
I want to run. Is there some way of avoiding having
to type in the full path?

3) I would like to use cp to keep source files in
aggrement on sepparate machines. I have tried the
following command:
cp -v -u -r d:/cclib g:
where d: is a drive on my laptop, and g: is a drive
on my desktop. The problem is that the timestamps on
all the copied files are set to the current system 
files. I would like the timestamps to be the same
on all the copied files. This way when I copy back
from g:
cp -v -u -r g:/cclib d:
I get only the files that I have worked on during
the day. They way things stand, all of the files
I copied in the morning are copied back a second 
time. Is there a way to make the timestamps match?

Thanks in Advance,

Clark Sims


--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.
#include <stdio.h>
#include <string.h>
#include <conio.h>

void append_input( const char *npt, char *pg, int ln, int mxln, int mxwdth);
/*
assumes: 
   ln > 0
   mxwdth > 0
   strlen( npt) < mxwdth
   ln < mxln
   npt can't contain a newline character
changes:
   characters between pg[ln*mxwdth] and pg[ln*mxwdth+strlen(npt)]
description:
   appends npt to pg, at line ln
*/

void dump_input( const char *pg, int nmln, int mxln, int mxwdth, int wait);
/*
assumes:
   mxln >= nmln  > 0
   pg contains vallid null terminated strings, with a stride of mxwdth
changes:
   stdout
description:
   this dumps pg to stdout
   if wait is true, than getch is called, which causes
   the program to pause untill a key is hit from the keyboard
*/
 
#define MAXWIDTH 258

char input[MAXWIDTH+1];

const char *_usage = "usage: mypg [-p=25]\n";
int main( int argc, const char* argv[])
{
int p=25, i;
char *pg, *pinput;

if (argc > 1)
{
  if (argc!=2)
    {
      goto usage;
    }
  if (memcmp( argv[1], "-p=", 3) != 0)
    {
      goto usage;
    }
  p = atol( argv[1]+3);
  if (p<=0)
    {
      printf( "p must be > 0\n");
      goto usage;
    }
}
  
pg = (char *)malloc( p*MAXWIDTH);
if (pg==NULL){
  printf( "out of memory\n");
  return 2;
}

i = 0;
do {
  input[0] = 0;
  pinput = gets( input);
  
  if (pinput != NULL || input[0]!=0)
    {
      append_input( input, pg, i, p, MAXWIDTH);
      i++;
    }
    
  if (i%p == 0 || pinput==NULL)
    {
      dump_input( pg, i, p, MAXWIDTH, pinput!=NULL);
      i = 0;
    }
} while (pinput != NULL);
      
return 0;

usage:

printf( _usage);

return 1;
}

void append_input( 
   const char *npt, 
   char *pg, 
   int ln, 
   int mxln, 
   int mxwdth)
{
char *funcname = "append_input";	
long nptlen;

if (npt==NULL)
   {
      printf( "npt==NULL in %s\n", funcname);
      exit( 1);
   }

if (pg==NULL)
   {
      printf( "pg==NULL in %s\n", funcname);
      exit( 1);
   }

if (ln < 0)
   {
	   printf( "ln<= in %s\n", funcname);
	   exit( 1);
   }

if (mxln < 0)
   {
	   printf( "mxln<= in %s\n", funcname);
	   exit( 1);
   }

if (mxwdth < 0)
   {
	   printf( "mxwdth<= in %s\n", funcname);
	   exit( 1);
   }

nptlen = strlen( npt);

if (nptlen >= mxwdth)
   {
      printf( "strlen(input) > maxwidth in %s\n", funcname);
      exit( 1);
   }
   
strcpy( pg+ln*mxwdth, npt);

}    

void dump_input( 
   const char *pg, 
   int nmln, 
   int mxln, 
   int mxwdth, 
   int wait)
{
int i;

if (nmln > mxln)
  {
    printf( "error, nmln > mxln in dump_input\n");
    exit( 1);
  }

for (i=0;i<nmln;i++)
  {
    puts( pg+i*mxwdth);
  }
  
fflush( NULL);

if (wait)
   {
      getch();
   }
}






^ permalink raw reply	[flat|nested] 44+ messages in thread

* Newbie questions..
@ 1999-01-31 23:52 Jan Hubicka
  0 siblings, 0 replies; 44+ messages in thread
From: Jan Hubicka @ 1999-01-31 23:52 UTC (permalink / raw)
  To: gnu-win32

Hi
Those are probably common questions, but I can't find the answer in
the FAQ.

I am working on XaoS port for Windows (thanks to Jan Olderdissen it mostly
works now). It have also DirectX support. Jan did it using dll library from
MSVC, that contains necesary functions and is used by XaoS. I want to merge
those two parts and compile DirectX calls directly in CygWin (MingWin).
Is this possible? Can I find DirectX headers somewhere?

Other stupid quiestion is about keyboards. WHen cygwin program is started,
keyboard switching don't work (I have installed czech keyboard as primary
and English as secondary) and programming in Czech keyboard is quite anoying
Is there any way to switch the keyboards? (I am using W95 here in school)

Thanks
Please reply directly to my, because I am not subscribed.

Honza
-- 
                       OK. Lets make a signature file.
+-------------------------------------------------------------------------+
|        Jan Hubicka (Jan Hubi\v{c}ka in TeX) hubicka@freesoft.cz         |
|         Czech free software foundation: http://www.freesoft.cz          |
|AA project - the new way for computer graphics - http://www.ta.jcu.cz/aa |
|  homepage: http://www.paru.cas.cz/~hubicka/ , games koules, Xonix, fast  |
|  fractal zoomer XaoS, index of Czech GNU/Linux/UN*X documentation etc.  | 
+-------------------------------------------------------------------------+
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 44+ messages in thread

* RE: Newbie questions....
@ 1998-04-02  9:35 Earnie Boyd
  0 siblings, 0 replies; 44+ messages in thread
From: Earnie Boyd @ 1998-04-02  9:35 UTC (permalink / raw)
  To: anagle, gnu-win32, martin

If you issue bash with the --login script then it will execute a 
/etc/profile file.  If you "export HOME=/home/martin" from within 
/etc/profile and "source ~/.bashrc" it will do what you want.

EXAMPLE:

#file: /etc/profile
#This file will be used by "bash --login"
#
export HOME=/home/martin
export PATH=.:/usr/bin:/usr/local/bin:$PATH
source ~/.bashrc

-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------

Check out these great gnu-win32 related sites:
ftp://ftp.cygnus.com/pub/gnu-win32/latest/                  (ftp site)
http://www.cygnus.com/pubs/gnupro/                    (Comercial Page)
http://www.cygnus.com/misc/gnu-win32/                   (Project Page)
http://www.cygnus.com/ml/gnu-win32                     (Mail Archives)
http://www.itribe.net/virtunix/winhelp-man-pages/     (HTML Man Pages)
http://www.lexa.ru/sos                               (Sergey Okhapkin)
ftp://www.lexa.ru/pub/domestic/sos/                (Sergey's ftp site)
http://www.fu.is.saga-u.ac.jp/~colin/gcc.html           (Colin Peters)
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/    (Mumit Khan)
http://gnu-win32.paranoia.ru                   (Chuck Bogorad's ports)
http://www.bestweb.net/~aka/gnu-win32/  (GNU-Win32 Bash Configuration)
http://rcw.home.ml.org/                  (Rob Warner - software ports)
http://www.wenet.net/~garbanzo/gnuwin32/     (more - software portals)
http://www.wenet.net/~garbanzo/gnuwin32/rpm   (Redhat Package Manager)
http://www.parallax.co.uk/~andyp/index_text.html  (Andy Piper - ports)
http://www.tiac.net/users/cgf     (Christopher Faylor - package ports)
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/       (German mirror)

SEARCH ENGINES WITH gnu-win32 mail archive RELATED INDICIES:
http://www.progressive-comp.com/Lists/?l=gnu-win32&r=1&w=2#gnu-win32
http://www.findmail.com
http://www.search.com
add gnu-win32 or gnuwin32 to the search criteria.

Help for Win32 Beginners: http://www.relisoft.com

>From: "Smith, Martin" <martin@buntypost.dundee.ncr.com>
>To: "Nagle, Adrian" <anagle@ball.com>,
>        GNU-WIN32 Project
>	 <gnu-win32@cygnus.com>
>Subject: RE: Newbie questions....
>Date: Sun, 22 Mar 1998 14:41:12 -0000
>
>I had to set HOME=/home/martin via the System icon in the NT Control 
Panel
>(under the Environment tab). This works fine but I'd be interested in
>knowing if anyone has been able to do it from .bashrc or equivalent.
>
>Regards,
>	Martin
>
>> -----Original Message-----
>> From:	Nagle, Adrian [SMTP:anagle@ball.com]
>> Sent:	Thursday, March 19, 1998 6:18 PM
>> To:	GNU-WIN32 Project
>> Subject:	Newbie questions....
>> 
>> I am interested in the CYGWIN-32 project.  Since at work, I must use 
NT,
>> I keep pulling hairs out when the ls command doesn't work.  
Fortunately
>> I found CYGWIN-32 and the bash shell.  That seems to solve my 
problem.
>> 
>> However, some questions.  I've tried to find the information on the 
web,
>> but haven't been successful.  How does bash work in CYGWIN-32?  I 
can't
>> figure out how to set the $HOME variable.  I have my .bash_profile 
and
>> .bashrc in my home directory to configure my environment, but 
executing
>> the cygnus.bat file (to start bash) will not source those files and 
it
>> puts me in the desktop directory.  How do I configure bash so that it
>> sources my config files?
>> 
>> Or, better yet, what is the best link for the documentation?  That 
could
>> answer more of my questions (i.e. getting g77 to work).
>> 
>> Thanks for the help.
>> 
>> Adrian
>> 
>> 
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>> Adrian Nagle                                      Tele: 303-939-6518
>> Thermal Engineer                                   FAX: 303-939-5166
>> Ball Aerospace & Technologies Corp.
>> Boulder, Colorado
>> http://www.ball.com/aerospace/batchp.html
>> 
>> 
>> -
>> For help on using this list (especially unsubscribing), send a 
message to
>> "gnu-win32-request@cygnus.com" with one line of text: "help".
>-
>For help on using this list (especially unsubscribing), send a message 
to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions....
       [not found] <199803221444.GAA20073@cygnus.com>
@ 1998-04-02  9:35 ` Michael Hirmke
  0 siblings, 0 replies; 44+ messages in thread
From: Michael Hirmke @ 1998-04-02  9:35 UTC (permalink / raw)
  To: gnu-win32

Hi,

>I had to set HOME=/home/martin via the System icon in the NT Control Panel
>(under the Environment tab). This works fine but I'd be interested in
>knowing if anyone has been able to do it from .bashrc or equivalent.

HOME must be set before you start bash, because otherwise your .bashrc
can't be found.
So either you have to run bash from a .bat/.cmd script as cygnus.bat,
which comes with B19 or you have to set your env vars through control
panel. Of course you can change HOME in .bashrc, so that it points to a
different directory then.

>
>Regards,
>	Martin

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://minimike.franken.de/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Newbie questions....
@ 1998-02-28 23:38 Nagle, Adrian
  0 siblings, 0 replies; 44+ messages in thread
From: Nagle, Adrian @ 1998-02-28 23:38 UTC (permalink / raw)
  To: GNU-WIN32 Project

I am interested in the CYGWIN-32 project.  Since at work, I must use NT,
I keep pulling hairs out when the ls command doesn't work.  Fortunately
I found CYGWIN-32 and the bash shell.  That seems to solve my problem.

However, some questions.  I've tried to find the information on the web,
but haven't been successful.  How does bash work in CYGWIN-32?  I can't
figure out how to set the $HOME variable.  I have my .bash_profile and
.bashrc in my home directory to configure my environment, but executing
the cygnus.bat file (to start bash) will not source those files and it
puts me in the desktop directory.  How do I configure bash so that it
sources my config files?

Or, better yet, what is the best link for the documentation?  That could
answer more of my questions (i.e. getting g77 to work).

Thanks for the help.

Adrian

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Adrian Nagle                                      Tele: 303-939-6518
Thermal Engineer                                   FAX: 303-939-5166
Ball Aerospace & Technologies Corp.
Boulder, Colorado
http://www.ball.com/aerospace/batchp.html


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions
@ 1998-02-09  5:30 Earnie Boyd
  0 siblings, 0 replies; 44+ messages in thread
From: Earnie Boyd @ 1998-02-09  5:30 UTC (permalink / raw)
  To: silasbrown; +Cc: gnu-win32

Hi Silas,

Since it appears that you are more interested in a true Win32 
environment you might take a look at the Mingw32 ports available via 
Colin Peters' page whose URL is listed below.

The Cygnus project adds a UNIX layer between tools and executables.  
This adds overhead that you may not be interested in.  The Mingw32 
project removed the dependency on the cygwin.dll.  When files are read 
by programs built with Mingw32 and the default modes are used on the 
open function, the programs will read \n or \r\n and write \r\n.

You will also find your one parameter mkdir function and your strlwr 
function.

-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------

Check out these great gnu-win32 related sites:
ftp://ftp.cygnus.com/pub/gnu-win32/latest/                  (ftp site)
http://www.cygnus.com/pubs/gnupro/                    (Comercial Page)
http://www.cygnus.com/misc/gnu-win32/                   (Project Page)
http://www.cygnus.com/ml/gnu-win32                     (Mail Archives)
http://www.itribe.net/virtunix/winhelp-man-pages/     (HTML Man Pages)
http://www.lexa.ru/sos                               (Sergey Okhapkin)
ftp://www.lexa.ru/pub/domestic/sos/                (Sergey's ftp site)
http://www.fu.is.saga-u.ac.jp/~colin/gcc.html           (Colin Peters)
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/    (Mumit Khan)
http://gnu-win32.paranoia.ru                   (Chuck Bogorad's ports)
ftp://ftp.deninc.com/pub (Den Internet Services - US mirror and ports)
http://www.bestweb.net/~aka/gnu-win32/  (GNU-Win32 Bash Configuration)
http://rcw.home.ml.org/                  (Rob Warner - software ports)
http://www.wenet.net/~garbanzo/gnuwin32/     (more - software portals)
http://www.wenet.net/~garbanzo/gnuwin32/rpm   (Redhat Package Manager)

>From: "Silas S. Brown" <silasbrown@bigfoot.com>
>To: gnu-win32@cygnus.com
>Date: Fri, 6 Feb 1998 22:55:36 +0000
>Subject: Newbie questions
>
>I guess that these are really silly questions for the list, but I 
>can't find the answers in the FAQ or the archives - maybe somebody 
>could put them in the FAQ?
>
>1.  Why don't functions like strlwr() seem to be included?  They're 
>in the standard (I think).
>
>2.  Why does mkdir() have a second integer parameter? - I've never 
>seen this on any other compiler.
>
>3.  The FAQ says that Cygnus can't re-distribute the Microsoft API 
>header files, but that it is building up a set of its own.  I tried 
>searching all of the include files for a few functions (like 
>midiOutOpen) but couldn't find them.  Is this because the set is 
>incomplete?  Is there anywhere where one can download the Microsoft 
>header files, and can these then be used?
>
>4.  When I try using Cygnus to write a CGI "script", MS Internet 
>Services complains that "The script misbehaved by returning an 
>incomplete set of headers".  It seems that it isn't even executing at 
>all.  However, when I run it from Command Prompt (with an artificial 
>QUERY_STRING), everything is fine.  It also works on other systems.  
>Is there any reason why this is happening?
>
>Many thanks
>
>Regards
>
>-- Silas S. Brown, http://www.bigfoot.com/~silasbrown/ (free music 
program etc)
>
>"Time and unforseen occurance befall them all" - Ecclesiastes 9:11
>
>-
>For help on using this list (especially unsubscribing), send a message 
to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>




______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions
  1998-02-06 16:53 ` Newbie questions Silas S. Brown
@ 1998-02-07  6:45   ` Benjamin Riefenstahl
  0 siblings, 0 replies; 44+ messages in thread
From: Benjamin Riefenstahl @ 1998-02-07  6:45 UTC (permalink / raw)
  To: gnu-win32

Hi Silas,


Silas S. Brown wrote:
> 1.  Why don't functions like strlwr() seem to be included?  They're
> in the standard (I think).

No. PC compilers all have inherited this one from MS C.

> 2.  Why does mkdir() have a second integer parameter? - I've never
> seen this on any other compiler.

Because Cygnus tries for as much Unix compatibility as possible. The
original Unix mkdir() has this second parameter to specify the
permissions for the new directory. DOS didn't have directory
permissions, so this one got left out by MS C. I think you can specify
0777 for this (an octal bit field meaning all users have all access).

> 3.  ... I tried
> searching all of the include files for a few functions (like
> midiOutOpen) but couldn't find them.  Is this because the set is
> incomplete? 

Yes.

> Is there anywhere where one can download the Microsoft
> header files, and can these then be used?

No. MS doesn't write standard C header files. Either the headers or the
compiler needs to be adapted.

> 4.  When I try using Cygnus to write a CGI "script", MS Internet
> Services complains that "The script misbehaved by returning an
> incomplete set of headers".

Could this be a \n vs \r\n problem? In other words is the line end now
\n only and does it work if you try to use \r\n as the line ends?


so long, benny
======================================
Benjamin Riefenstahl (benny@crocodial.de)
Crocodial Communications EntwicklungsGmbH
Ophagen 16a, D-20257 Hamburg, Germany
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Newbie questions
  1998-02-06  8:16 bash questions Eric Horowitz
@ 1998-02-06 16:53 ` Silas S. Brown
  1998-02-07  6:45   ` Benjamin Riefenstahl
  0 siblings, 1 reply; 44+ messages in thread
From: Silas S. Brown @ 1998-02-06 16:53 UTC (permalink / raw)
  To: gnu-win32

I guess that these are really silly questions for the list, but I 
can't find the answers in the FAQ or the archives - maybe somebody 
could put them in the FAQ?

1.  Why don't functions like strlwr() seem to be included?  They're 
in the standard (I think).

2.  Why does mkdir() have a second integer parameter? - I've never 
seen this on any other compiler.

3.  The FAQ says that Cygnus can't re-distribute the Microsoft API 
header files, but that it is building up a set of its own.  I tried 
searching all of the include files for a few functions (like 
midiOutOpen) but couldn't find them.  Is this because the set is 
incomplete?  Is there anywhere where one can download the Microsoft 
header files, and can these then be used?

4.  When I try using Cygnus to write a CGI "script", MS Internet 
Services complains that "The script misbehaved by returning an 
incomplete set of headers".  It seems that it isn't even executing at 
all.  However, when I run it from Command Prompt (with an artificial 
QUERY_STRING), everything is fine.  It also works on other systems.  
Is there any reason why this is happening?

Many thanks

Regards

-- Silas S. Brown, http://www.bigfoot.com/~silasbrown/ (free music program etc)

"Time and unforseen occurance befall them all" - Ecclesiastes 9:11

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: Newbie questions
  1998-02-06  1:27 ` Newbie questions Francois Felix Ingrand
@ 1998-02-06 11:19   ` Fergus Henderson
  0 siblings, 0 replies; 44+ messages in thread
From: Fergus Henderson @ 1998-02-06 11:19 UTC (permalink / raw)
  To: felix; +Cc: gnu-win32

On 06-Feb-1998, Francois Felix Ingrand <felix@laas.fr> wrote:
> 
> - I grabbed and installed less. It works fine, exept that it keeps complaining
> about the terminal being too stupid... indeed, TERM is currently set to
> dumb... is there any better possible TERM setting?

Try TERM=ansi or TERM=linux.

> - I use NT CVS 1.9. They distribute their own diff, patch, grep , etc
> utilities. Which one should I use? Last night gnu-win32 patch failed to update
> a CVS file, so I am really wondering if I should not use the cvs patch...

This is probably text-vs-binary issues.

Do you have your file system mounted with mode "text=binary"?
If so, then you will probably have problems, because
(my guess is that) NT CVS will use the usual DOS/Windows
text file convention, i.e. "text!=binary".

On the other hand, if you *don't* have your file system mounted
with mode binary, you will probably have problems,
because much of the software has not been ported to work
with mode "text!=binary".

In other words, either way, you're likely to have problems ;-)

You might have more luck compiling cvs from the source code using
gnu-win32.  Then you could get a version of cvs that uses the same
mode as cygwin32 (in particular, that uses "text=binary", if the
filesystem is mounted that way).

But I don't know whether cvs has been ported to cygwin32;
if not, you may run into other problems.

> - is it possible to get bash in a scrollable window? 

On NT, yes: just right-click on your dos window to edit
the display properties and set the scrollback length.
(Sorry if that description is a bit vague, I've been
fortunate enough to avoid Windows for a few months.)

-- 
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: < http://www.cs.mu.oz.au/~fjh >   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Newbie questions
  1998-02-05  9:14 tar (four questions) (NBY) Earnie Boyd
@ 1998-02-06  1:27 ` Francois Felix Ingrand
  1998-02-06 11:19   ` Fergus Henderson
  0 siblings, 1 reply; 44+ messages in thread
From: Francois Felix Ingrand @ 1998-02-06  1:27 UTC (permalink / raw)
  To: gnu-win32

I am new to this list and just started to use gnu-win32.

I have a bunch of questions already.... I already looked in the archive, but it
is not easy to consult them (what about making a WebGlimpse search on the
archive, hints, hints....)

- I grabbed and installed less. It works fine, exept that it keeps complaining
about the terminal being too stupid... indeed, TERM is currently set to
dumb... is there any better possible TERM setting?

- is lesstif available in binary format?

- where can I get perl 5 (in binary). I tried 
http://gnu-win32.paranoia.ru/
but the link between france and russia must be overloaded...

- I use NT CVS 1.9. They distribute their own diff, patch, grep , etc
utilities. Which one should I use? Last night gnu-win32 patch failed to update
a CVS file, so I am really wondering if I should not use the cvs patch...

- is it possible to get bash in a scrollable window? 

- what is coolview suppose to bring me? the web page is not very explicit about 
that. I grabbed it and unpacked it. There are binaries and libraries in
it. Should they replace the standard gnu-win32 ones?

Thanks in advance,
--
			Felix
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2014-02-06 20:34 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-13 12:00 newbie questions marcin pakula
  -- strict thread matches above, loose matches on Subject: below --
2014-02-04 19:20 Newbie Questions mrushton
2014-02-04 20:52 ` Gary Johnson
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
2002-07-06 21:26 Newbie questions rick
1999-08-25  7:53 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

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).