0

I read the use of here document. I tried something like this:

echo $* <<End  
anto  
End

What I'm trying here is, when I run this script rather than taking input from command line, I'm asking it to take it as anto. But this doesn't working for me.

I'm very new to bash scripting. Can anyone say, where I'm making the mistake?

Thanks in advance.

Ant's
  • 3,890

1 Answers1

2

echo doesn't read any information from stdin so you can't use a here-doc with it.

Use cat instead, like

cat<<End
anro
End