delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/10/17:37:54

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Thu, 10 May 2001 15:46:13 -0400
From: Chet Ramey <chet AT nike DOT ins DOT cwru DOT edu>
To: JROZYCKI AT ebmail DOT gdeb DOT com
Subject: Re: Question about the 'read' command in bash
Cc: cygwin AT cygwin DOT com, chet AT po DOT cwru DOT edu
Reply-To: chet AT po DOT cwru DOT edu
Message-ID: <010510194613.AA39326.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet AT po DOT CWRU DOT Edu
MIME-Version: 1.0
X-In-Reply-To: Message from JROZYCKI AT ebmail DOT gdeb DOT com of Thu, 10 May 2001 15:27:04 -0400 (id <85256A48 DOT 006A6FF5 DOT 00 AT ebmail DOT gdeb DOT com>)

> I have a bash shell script with the following lines of code:
> 
> #!/bin/bash
> uname | cut -c1-4 | read op_sys
> echo $op_sys
> 
> This works fine at work using SGI IRIX and ksh, but under cygwin and bash
> at home, op_sys does not get set - null is echoed.. what do I need to do
> differently?

Read the Bash FAQ, question E4.

ftp://ftp.cwru.edu/pub/bash/FAQ

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet AT po DOT CWRU DOT Edu    http://cnswww.cns.cwru.edu/~chet/

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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