Jul 15, 2002 #1 MagnumVP IS-IT--Management Jul 9, 2002 109 US Is it possible to allow the echo command to perform a 'ls' command in the KORN shell? I've tried; >list='ls' >echo $list >ls AND >list="ls" echo $list ls Any thoughts? MagnumVP
Is it possible to allow the echo command to perform a 'ls' command in the KORN shell? I've tried; >list='ls' >echo $list >ls AND >list="ls" echo $list ls Any thoughts? MagnumVP
Jul 15, 2002 #2 mrjazz MIS Apr 9, 2002 115 DE Hi MagnumVP, in the Korn Shell the follwing is possible: $ echo * will give you a list of all files in your working directory. If you want to store that list in a variable then you have to use back quotes: $ list=`ls` $ echo $list will give you exactly the same output as the echo command. mrjazz Upvote 0 Downvote
Hi MagnumVP, in the Korn Shell the follwing is possible: $ echo * will give you a list of all files in your working directory. If you want to store that list in a variable then you have to use back quotes: $ list=`ls` $ echo $list will give you exactly the same output as the echo command. mrjazz
Jul 15, 2002 #3 jad Programmer Apr 7, 1999 1,195 GB list=`ls` echo list would work ... but the actual work isw done at the list=`ls` stage. note these are backquotes. Upvote 0 Downvote
list=`ls` echo list would work ... but the actual work isw done at the list=`ls` stage. note these are backquotes.