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 is a program shell?
What are zombie processes?
I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.
What are the disadvantages of shell scripting?
Why should we use shell scripts?
shell script for reverse the string
c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l
Is SSO and SSL support BOXI?
How do I open the shell in cmd?
What are the advantages of shell script?
What is a file basename?
What are the different types of shell scripting?