Cygwin Scripting problem + link to download Cygwin

Status
Not open for further replies.

mobile-it

Advanced Member level 1
Joined
Apr 24, 2004
Messages
464
Helped
22
Reputation
44
Reaction score
8
Trophy points
1,298
Activity points
3,344
Cygwin Scripting

Hi all,

I have a problem reading in some user input to my scripts in cygwin (I am learning it...)

when I do:

$Read inputUser
Test

$echo $inputUser

he returns me the word Test


But:

When I build a script

#!/bin/sh
# Shows how to read a line from stdin
`read userinput`
echo $userinput

and run it it doesn't work... I am starting to learn making scripts... thanks for your help
 

Re: Cygwin Scripting

ok;

I know what the problem was.

I wrote the script in notepad from windows... If I write it in nano wich is into the cygwin everything works

#!/bin/sh
read name
echo $name
 

Cygwin Scripting

Oh, where can i download Cygwin?
 

    mobile-it

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…