How do you print the output the same string which is typed
in command line. how do you write the shell script or
command for this. if i entered "Hello" in command line, it
should print 'Hello', if i say "Hello Welcome", i should get
the "Hello Welcome" as output.?
Answers were Sorted based on User's Feedback
Answer / santana20142003
$read line ---> it will read
$ echo $line ---> it will display
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / nirmala
1)If you type "hello" in command line your script should be
written as below
echo $1
2)If you type "hello world" in command line your script
should be written as below
echo $*
3)If you type "hello" and "hello world" in cmd line and
your file name is"string" script is as written below
echo $1
shift 1
echo $*
i/p: string hello hello world
o/p:hello
hello world
Is This Answer Correct ? | 0 Yes | 6 No |
What does egrep mean?
What is shell and shell script?
give me some website where i can get unix and testing meterials
How can I send a mail with a compressed file as an attachment?
What is path in shell script?
Is shell scripting difficult?
What is a beat in a script?
What is the use of break command?
How do scripts work?
How do I open the shell prompt?
What is the use of "shift" command in passing parameters?
What is the significance of $#?