09-18-2006
well first of all you have to tell your environment which shell you are using, suppose your are using the bash shell then the script file would like:
#!/bin/bash
#The beginning of your script code
echo "What is your name ? "
read name
echo "Enter a 3 digit number"
read number
echo "The name you entered is " $name
echo "The number you have entered is " $number
#The end of your script code
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm new to UNIX and I want to learn Shell Scripting. I want a web site that has Shell Scripting tutorials. Any suggesstions?.? (3 Replies)
Discussion started by: liveapple2000
3 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I am relatively new to UNIX.
I know some basic commands.
I am learning to write shell scripts.
My first aim is to connect to a Data Base via shell script.
Any ideas on this?
Any links, docs which will tell me about scripting??
Thanks
VEN (1 Reply)
Discussion started by: VENC22
1 Replies
3. Shell Programming and Scripting
Know a very best Text for learning the SH shell (standard shell)??
can you speak a text for me ??? (1 Reply)
Discussion started by: ZINGARO
1 Replies
4. UNIX for Dummies Questions & Answers
Can any one please provide a fast learning tips to learn UNIX shell scripting?
Thanks,
Gov (3 Replies)
Discussion started by: Govindh.v
3 Replies
5. Shell Programming and Scripting
Hi,
I had completed RHCE and i am interested to learn shell scripting.
Request you to please let me know which book is best for learning shell scripting or any online website.
Thanks & Regards
arun (2 Replies)
Discussion started by: Arun.Kakarla
2 Replies
6. Shell Programming and Scripting
Hi
Which is the most useful shell scripting book. Planning to learn shell scripting.Thanks in advance. (1 Reply)
Discussion started by: arunvellanki
1 Replies
7. UNIX Desktop Questions & Answers
I am trying to learn Shell scripting in UNIX. Could Any one please suggest on how to get UNIX account or any other free stimulator available for download on which I can practice Unix shell script?
Thanks,
sam70 (9 Replies)
Discussion started by: sam70
9 Replies
8. Shell Programming and Scripting
i am a beginner i m learning shell by myself
i have problem writing a korn shell that takes an absolute pathname to directory and display all ordinary files in the directory ordered by their length.
i was thinking use grep ls sort and sed. maybe, i m wrong! can someone tell me? (2 Replies)
Discussion started by: babuda0059
2 Replies
9. UNIX for Beginners Questions & Answers
Will it be good to learn 1) Perl or 2) Ruby first? (3 Replies)
Discussion started by: alvinoo
3 Replies
10. UNIX for Beginners Questions & Answers
Hello everyone! I am a mechanical engineering student from Brazil, and I'm trying to get into numerical simulation in fluid dynamics.
A teacher recommended OpenFoam and from what I've been reading, it seems that I need to get familiar with ''the Shell'' at first, and this is why I'm here. I... (2 Replies)
Discussion started by: Heisenflower
2 Replies
LEARN ABOUT OPENSOLARIS
script
script(1) User Commands script(1)
NAME
script - make record of a terminal session
SYNOPSIS
script [-a] [filename]
DESCRIPTION
The script utility makes a record of everything printed on your screen. The record is written to filename. If no file name is given, the
record is saved in the file typescript. See WARNINGS.
The script command forks and creates a sub-shell, according to the value of $SHELL, and records the text from this session. The script ends
when the forked shell exits or when Control-d is typed.
OPTIONS
The following option is supported:
-a Appends the session record to filename, rather than overwriting it.
NOTES
script places everything that appears on the screen in filename, including prompts.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5)
WARNINGS
script can pose a security risk when used in directories that are writable by other users (for example, /tmp), especially when run by a
privileged user, that is, root. Be sure that typescript is not a link before running script.
SunOS 5.11 30 Jan 2004 script(1)