Sponsored Content
Full Discussion: Run cygwin in .bat file
Top Forums Shell Programming and Scripting Run cygwin in .bat file Post 302367293 by Teroc on Monday 2nd of November 2009 06:29:58 AM
Old 11-02-2009
Run cygwin in .bat file

Hello everyone,

I've written quite a few AWK scripts to run in cygwin and now, I would like to run them one after the other in a .bat file. The problem is, I tried modifying the .bat file used to run cygwin in the first place, but whenever I change something, it doesn't work.
The PATH is set up correctly if you wonder... I've read some posts on this forum and elsewhere, but everything I tried didn't work.

First I need to change directory, but when I use cd, it says "No such file or directory".
Even when in the command prompt I type "c:\cygwin\bin\bash awk" (for example), it says /usr/bin/awk: No such file or directory...

Here is a bat file I use that doesn't work...
Code:
@echo off

C:
chdir C:\cygwin\bin

bash --login -i 'cd /cygdrive/m/qc'

If you have any idea, please tell me!
Thank you.
 

10 More Discussions You Might Find Interesting

1. Linux

Run Webmin on Cygwin

Hello, I was wondering how i would download Webmin and install it on Cygwin. Can you install basically any linux program on cygwin and have it run or is it differet? Thanks for your help. (6 Replies)
Discussion started by: xcaliber
6 Replies

2. UNIX for Advanced & Expert Users

help needed to connect to windows from unix and run .bat file

Hi Can anyone tell if it is possible to connect from Unix to t a remote windows environment and run a .bat script. Do SSH/SFTP... serve my purpose..if s how.... if not which commands or scripts will help with my requiremnt. points on this are greatly honoured. Thanks in advance. :) (1 Reply)
Discussion started by: lakshmis10
1 Replies

3. Shell Programming and Scripting

how to run cgi -script on Cygwin ?

All, I would like to run a cgi script in cygwin which i have installed in WinXP. My CYGWIN directory structure is /var/www/ drwxrwx---+ 2 user Users 0 Nov 23 16:24 cgi-bin drwxrwx---+ 3 user Users 0 Oct 22 17:21 htdocs drwxrwx---+ 3 user Users 0 Oct 22 17:22 icons and another... (1 Reply)
Discussion started by: jambesh
1 Replies

4. Shell Programming and Scripting

Can't get Cygwin to run scripts

I haven't been on a unix system in a long time and I'm trying to teach a friend unix. After looking at/testing various options cygwin seemed to be the easiest to download and install. Everything works pretty much as I recall and I even tested a small java program on it. I can't seem to get... (4 Replies)
Discussion started by: mmtemp
4 Replies

5. UNIX for Dummies Questions & Answers

How to use cygwin to run bash script

Hi, all, I try to run a quite simple bash script mytest.sh in cygwin, it's content is: #!/bin/bash echo "It is my first bash shell" there are three lines in the script. The second line is blank line. When I run it use command: bash c:/mytest.sh, ... (6 Replies)
Discussion started by: Jenny.palmy
6 Replies

6. Shell Programming and Scripting

Run shell script from .bat file

hi how can I execute a shell script on unix server from a .bat file of windows desktop?? Regards. (3 Replies)
Discussion started by: Chaitrali
3 Replies

7. UNIX for Dummies Questions & Answers

tip: Simple script won't run in cygwin - vim editor involved

I ran into this issue and thanks to various postings in various forums, was able to figure out the solution but didn't see one posting that laid the whole issue out cleanly. So thought the following might help others ... ------------------------------------------------------------------------... (2 Replies)
Discussion started by: oxysep
2 Replies

8. Shell Programming and Scripting

How to run Cygwin bash from windows scheduled task?

Hmmm.... I love these forums because I always get great prompt responses and I want to ask a question about running bash on windows. Is that allowed? Now I know I can install cygwin cron and run bash that way. Can I run bash from windows schedule task? How? thanks siegfried (1 Reply)
Discussion started by: siegfried
1 Replies

9. Shell Programming and Scripting

Need help with bat file!!!

I need to put/get files from Windows machine to Unix machine and vice-versa. I wrote a text file "ftp1.txt" as below. naga naga06 cd /root/Naga prom off get time.unl bye I wrote another bat file "ftp.bat" as below. ftp -n -s:C:\Users\Naga\Desktop\ftp1.txt IP_ADDRESS but... (2 Replies)
Discussion started by: Naga06
2 Replies

10. Windows & DOS: Issues & Discussions

run cygwin bash script from notepad++

I'm using Notepad++ to edit my BASH scripts and using CYGWIN to run them from Windows7. In Notepad++ there is a 'Run' capability. How do I get this to run my scripts directly without having to enter the script name from the Cygwin command line? (3 Replies)
Discussion started by: millsy5
3 Replies
OPENVT(1)							     Linux 1.x								 OPENVT(1)

NAME
openvt - start a program on a new virtual terminal (VT). SYNOPSIS
openvt [-c vtnumber] [-s] [-u] [-l] [-v] [--] command command_options DESCRIPTION
openvt will find the first available VT, and run on it the given command with the given command options, standard input, output and error are directed to that terminal. The current search path ($PATH) is used to find the requested command. If no command is specified then the environment variable $SHELL is used. OPTIONS -c vtnumber Use the given VT number and not the first available. Note you must have write access to the supplied VT for this to work. -s Switch to the new VT when starting the command. The VT of the new command will be made the new current VT. -u Figure out the owner of the current VT, and run login as that user. Suitable to be called by init. Shouldn't be used with -c or -l. -l Make the command a login shell. A - is prepended to the name of the command to be executed. -v Be a bit more verbose. -w wait for command to complete. If -w and -s are used together then openvt will switch back to the controlling terminal when the com- mand completes. -- end of options to openvt. NOTE
If openvt is compiled with a POSIX (GNU) getopt() and you wish to set options to the command to be run, then you must supply the end of options -- flag before the command. EXAMPLES
openvt can be used to start a shell on the next free VT, by using the command: openvt bash To start the shell as a login shell, use: openvt -l bash To get a long listing you must supply the -- separator: openvt -- ls -l HISTORY
Earlier, openvt was called open. It was written by Jon Tombs <jon@gtex02.us.es or jon@robots.ox.ac.uk>. The -w idea is from "sam". SEE ALSO
chvt(1), doshell(8), login(1) 19 Jul 1996 V1.4 OPENVT(1)
All times are GMT -4. The time now is 09:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy