Sponsored Content
Top Forums Shell Programming and Scripting learning how to use shell script Post 302089262 by charbel on Monday 18th of September 2006 10:07:59 AM
Old 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

Learning Shell 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

Learning to write UNIX Shell Scripts

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

A Text for learning the SH shell

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

Learning Tips - UNIX Shell Script

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

Suggested Books for Learning Shell 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

Shell scripting book learning.

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

Unix shell script learning

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

self-learning! my korn shell problem

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

After Learning Shell Scripting

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

Looking for guidance on learning the shell

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
DDB(8)							    BSD System Manager's Manual 						    DDB(8)

NAME
ddb -- configure DDB kernel debugger properties SYNOPSIS
ddb capture [-M -core] [-N -system] print ddb capture [-M -core] [-N -system] status ddb script scriptname ddb script scriptname=script ddb scripts ddb unscript scriptname ddb pathname DESCRIPTION
The ddb utility configures certain aspects of the ddb(4) kernel debugger from user space that are not configured at compile-time or easily via sysctl(8) MIB entries. To ease configuration, commands can be put in a file which is processed using ddb as shown in the last synopsis line. An absolute pathname must be used. The file will be read line by line and applied as arguments to the ddb utility. Whitespace at the beginning of lines will be ignored as will lines where the first non-whitespace character is '#'. OUTPUT CAPTURE
The ddb utility can be used to extract the contents of the ddb(4) output capture buffer of the current live kernel, or from the crash dump of a kernel on disk. The following debugger commands are available from the command line: capture [-M core] [-N system] print Print the current contents of the ddb(4) output capture buffer. capture [-M core] [-N system] status Print the current status of the ddb(4) output capture buffer. SCRIPTING
The ddb utility can be used to configure aspects of ddb(4) scripting from user space; scripting support is described in more detail in ddb(4). Each of the debugger commands is available from the command line: script scriptname Print the script named scriptname. script scriptname=script Define a script named scriptname. As many scripts contain characters interpreted in special ways by the shell, it is advisable to enclose script in quotes. scripts List currently defined scripts. unscript scriptname Delete the script named scriptname. EXIT STATUS
The ddb utility exits 0 on success, and >0 if an error occurs. EXAMPLES
The following example defines a script that will execute when the kernel debugger is entered as a result of a break signal: ddb script kdb.enter.break="show pcpu; bt" The following example will delete the script: ddb unscript kdb.enter.break For further examples, see the ddb(4) and textdump(4) manual pages. SEE ALSO
ddb(4), textdump(4), sysctl(8) HISTORY
The ddb utility first appeared in FreeBSD 7.1. AUTHORS
Robert N M Watson BUGS
Ideally, ddb would not exist, as all pertinent aspects of ddb(4) could be configured directly via sysctl(8). BSD
December 24, 2008 BSD
All times are GMT -4. The time now is 09:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy