In "bash" shell it can be achieved with command "read"
#!/bin/bash
echo "Hi There, what is your name?"
read name
echo $name
With the # symbol.
The special line at the beginning of the script is only necessary if you want the script to be run by a certain command interpreter that is different from your logon shell or because you don't know what environment the user of the shell might be running in. It is a special comment line that looks like: #!/command-name such as: #!/usr/bin/ksh which causes the ksh interpreter to be used for the rest of the shell script.
use python, shell is stupid
A shell script starts with the definition of the interpreter to use. Usually when one says ``shell script'', one means bash script. So a good first line would be #!/bin/bash This says that the program located in the filesystem at /bin/bash should be executed with this script as its input. With a bash script, you can simply start typing a list of commands. Furthermore it is possible to use logic and control structures like if, else, for, while, etc etc. See http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html for a good starting guide.
That would depend on what shell you're using. Most seem to have a command similar to "echo x" which will print x to the terminal.
The echo command echoes out any of the command line arguments given to it. It is commonly used in shell scripts to echo what portions of the shell script are doing.
The Unix/Linux tee command permits the forking of a data pipe in a shell script or at the command line. The teecommand does this by both writing it's standard input to a file and to it's standard output simultaneously. Most implementations of tee provide for both file overwrite/creation and file appends by command line switch options.
Linux shell scripting tutorials are available as pdf files or videos where a lecturer speaks over a video of a computer console. This is where you can watch someone code in the bash environment and follow along.
#!/bin/sh sed -e 's/\W\+/\n/g' | sort -u
Not all shell processes do this. If the shell process is asking for standard input (keyboard), the Control-D is an end of file signal, which means no more data will be forthcoming. If a process requires or uses input and you tell it there isn't any, most processes will just end at that point.
i=1 while [ $i -le $# ] do grep -v Unix $i > $i done
We can use php tags in different ways. <?php //php code to be written here ?> OR <? //php code ?> This tag will not work when we using editors such as macromedia dreamweaver. OR < script language="php"> //php code </script>