Description of problem: `line="**";echo $line` produces the out put of `ls -d` that is the file names in the directory a double astrix (**) any where in a string also produces the same result Also tried with "env echo" -- [yayati@mini filesplit]$ line='**';env echo $line deleme.txt new1.log new.log Parse_file_writeup.doc Parse_file_writeup_query.doc Parse_file_writeup_query.zip RC40A.BU1.XFB10.MARISVO.C7501V00 record_parse.sh records samdata.txt SmallSampleDataFile.txt t1.sh test.sh [yayati@mini filesplit]$ -- Version-Release number of selected component (if applicable): coreutils-7.2-1.fc11.i586 How reproducible: line='**';env echo $line Steps to Reproduce: 1.line='**';env echo $line 2. 3. Actual results: deleme.txt new1.log new.log Parse_file_writeup.doc Parse_file_writeup_query.doc Parse_file_writeup_query.zip RC40A.BU1.XFB10.MARISVO.C7501V00 record_parse.sh records samdata.txt SmallSampleDataFile.txt t1.sh test.sh Expected results: ** Additional info: why does echo interpret ** as files in the dir?
Not security.
Thanks for report, but what you see is just shell expansion of argument. Additionally, usually you don't use coreutils utility `echo` but shell builtin echo (I assume you use bash). If you want to prevent shell expansion, use double quotes around the variables (common practice in shell scripts). That's NOTABUG, not security, just expected behaviour, closing.
Also not a bug imo. * is shell meta character, that "matches any string, including the empty string" (glob(7)). It is expected that something like this: echo * is expanded by shell to: echo [list of all files in current directory] before command in question (echo here) is run. You can use quotes to prevent expansion.
Thanks all of you, I apologise for wasting your valuable time. Regards.