daudiam -6 Junior Poster
cmd='date | wc'
$cmd

If this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument". What is meant by expansion of pipe. When we execute date | wc on the command line, it goes fine. then | is not treated as an argument. Why?

Works correctly using eval though! How?