delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/11/15/10:34:01

From: VZELL AT de DOT oracle DOT com (Volker Zell)
Subject: Bash problem
15 Nov 1997 10:34:01 -0800 :
Message-ID: <199711151835.TAA13839.cygnus.gnu-win32@mailm1>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hi all !



The following two lines of code work on the command line but not if executed 

from a shell script.



vzell:/usr/bin> myls=`ls -lt`

vzell:/usr/bin> echo $myls

total 156

-rw-r--r--   1 vzell    admin         177 Nov 15 19:13 t

-rw-r--r--   1 vzell    admin        1763 Nov 15 19:08 whatis

-rw-r--r--   1 vzell    admin        1695 Nov 15 19:06 apropos

-rwxr--r--   1 vzell    admin       38923 Oct 11 18:19 txt2html*





#!/bin/sh

myls=`ls -lt`

echo $myls



In this case I get an empty line.



Any hints ?





Ciao

  Volker
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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