delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/04/15/11:28:30

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: Can cygwin replace win-bash under Windows 7?
Date: Fri, 15 Apr 2011 08:27:35 -0700
Lines: 45
Message-ID: <io9o57$4v2$1@dough.gmane.org>
References: <31403137 DOT post AT talk DOT nabble DOT com> <31404379 DOT post AT talk DOT nabble DOT com>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15pre) Gecko/20110207 Lightning/1.0b2 Shredder/3.1.9pre
In-Reply-To: <31404379.post@talk.nabble.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 04/15/11 03:05, BazookaJo wrote:
>
> Sorry guys - in my original post I was suggesting replacing win-bash with
> Powershell, when I am looking to replace win-bash with cygwin, but post
> amended :)
>
>
> BazookaJo wrote:
>>
>> Hi guys
>>
>> I have been playing around with an industrial Linux-powered scanner, and
>> was making okay progress under XP.
>>
>> This was made easier as I just ran some of the bash scripts through
>> win-bash.
>>
>> Since moving to Windows 7 of course this no longer works, even if I
>> disable UAC completely - just echos on screen with no errors....
>>
>> I can only guess that the reason is that win-bash no longer works with
>> Windows 7?
>>
>> My question is will cygwin fill the gap?
>>
>> i.e. if this is my win-bash script what would the cygwin equivalent look
>> like, or am I barking up the wrong tree?
>>
>> echo !TC | C:/win-bash/nc 192.172.1.6 80 > ScanFile.dta
>>
>> p.s. nc = netcat and I know I need an alternative sooner rather than 
>> later
>>
>> Very many thanks in advance
Your question is unclear. Your "bash" script is one line. AFAICT that 
one line would run equally well in just plain ole cmd. (cmd can do echo, 
pipes and redirection). I suspect your question is more about win-bash's 
nc, which seems to be a simple way to sent a command to a port on a 
machine which even telnet can do though I'm not sure in a scriptable 
fashion. Perl and Expect, etc. can accomplish this quite easily though 
(and Cygwin has both of them).

-- 
Andrew DeFaria <http://defaria.com>
Ambition is a poor excuse for not having enough sense to be lazy.


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019