How can I run a script?

Mirco Piccin pictux@gmail.com
Mon Jan 14 16:11:00 GMT 2008


Hi again.

> The base install of cygwin is on an E: drive.  C: didn't have enough room.
>
> So if I understand correctly something like -
>
>
> E:
>
> chdir E:\cygwin\bin
>
> bash --login -i -c 'rsync -avz root@10.0.0.2 :/home/funnel/Jan*
> /cygdrive/e/Earchives'

...yes, it seems right.

> Then another question arises where does the std output and std error
> go too?   2>&1 >> foo_file ?
>
> I could fix that by running rsync in quite mode -q

Well, if you want to save the log, you can simply redirect all the
output in a file, so append something like that to your original
command (inside the '):
>> /any/path/log_file
do the job.
If you want to discharge the output, appending :
 2>&1
should be enough.

Anyway, after the shell command is ran, the shell close itself.
It is also possible to create a bash script on cygwin environment and
then start it by the way described above.

Regards
M

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list