01-24-2008
mods
Just remove all the lines copied below
I'd be interested to know if the model works fine...
----
echo "*******************************************************"
echo "* Model to estimate the elongation (%) of a steel *"
echo "* as a function of elemental composition, heat and *"
echo "* mechanical treatments and grain size. *"
echo "* *"
echo "* More information: Materials Algorithms Project *"
echo "* *"
echo "* Model prepared with the Model Manager, Neuromat Ltd *"
echo "* More information: Neuromat Ltd::Modelling Solutions for Materials Science *"
echo "* *"
echo "* Authors: T.C.Illingworth, T.Sourmail, H. Bhadeshia *"
echo "* and D.J.C. MacKay *"
echo "*******************************************************"
echo "Press Return to continue"
read dummy
echo "*******************************************************"
echo "* *"
echo "* DISCLAIMER: This program, is provided AS IS without *"
echo "* warranty of any kind. We make no warranties, express*"
echo "* or implied, that this program, procedures and data *"
echo "* are free of error, or are consistent with any parti-*"
echo "* cular standard of merchantability, or that they *"
echo "* will meet your requirements for any particular *"
echo "* application. *"
echo "* IT SHOULD NOT BE RELIED ON FOR SOLVING A PROBLEM *"
echo "* WHOSE INCORRECT SOLUTION COULD RESULT IN INJURY TO *"
echo "* A PERSON OR LOSS OF PROPERTY. *"
echo "* *"
echo "* If you do use this program, it is at your own risk. *"
echo "* The Department of Materials Science and Metallurgy, *"
echo "* University of Cambridge, and the National Physical *"
echo "* Laboratory disclaim all liability for direct, inci- *"
echo "* dental or consequential damages resulting from your *"
echo "* use of this program. *"
echo "* *"
echo "*******************************************************"
echo ""
echo "Agree ? (y/*)"
read answer
correct='y'
if test $answer != $correct
then
exit
fi
echo "Display results ? (y/*)"
read answer
if test $answer = $correct
then
cat result
fi
echo "*******************************"
echo "* *"
echo "* Predictions done *"
echo "* results saved in 'result' *"
echo "* *"
echo "*******************************"
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have this script someone very kindly help me write last year which loops through all files in a folder and does a command.
I need to modify it to loop through all sub-folders of a main folder and only perform the command on files modified after Jan 1st 2008. And I need the command to place the... (3 Replies)
Discussion started by: Fred Goldman
3 Replies
2. Shell Programming and Scripting
Hi users,
I am on a beginner level and just joined this site.
I have created a simple .ksh file in the following manner
cat <<EOF >mfile
#!/bin/ksh
echo "hello world"
EOF
Request for some help with 2 cases
1. now i would like to add a second line after the first echo command... (4 Replies)
Discussion started by: corbusier
4 Replies
3. Shell Programming and Scripting
I need to replace the line daemon ntpd $OPTIONS in the following script with daemon ntpd $OPTIONS 2>&1 > /var/log/ntpd.log &
what will happen?
The idea of replacing is to capture the output on the console into ntpd.log file.
Will this work?
... (1 Reply)
Discussion started by: naive1977
1 Replies
4. Shell Programming and Scripting
Hi freinds
I have a small problem I want u to help me in, I have a syslog server and configured it to send me email automatically, I get a small perl script to help me in, and tested it to send alerts to root and it worked successfully without any problems
Now I want to send it outside, I... (4 Replies)
Discussion started by: reaky
4 Replies
5. Shell Programming and Scripting
Hi,
I am new to shell programming, and want to know is it possible to change the contents of file using script?
for example, if want to search 2 words and want to replace these words with 2 new words.
Regards,
Manoj (4 Replies)
Discussion started by: manoj.solaris
4 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I really wan't to know that how to edit a shell script with out using an editor..
Is there any command? (4 Replies)
Discussion started by: buddhi
4 Replies
7. Shell Programming and Scripting
Hello,
I have a shell script which calls for an existing script with appropriate parameters. It looks something like this.
--------------------------------------------------------------------------
#!/bin/bash
sh /root/ams_rc stop_shepherd > /dev/null
sleep 30
sh /root/ams_rc... (9 Replies)
Discussion started by: Siddheshk
9 Replies
8. UNIX for Dummies Questions & Answers
Hey all,
So I have an AWK command here
awk '{if(FNR==NR) {arr++;next} if($0 in arr) { arr--; if (arr == 0) delete arr;next}{print $0 >"list2output.csv"}} END {for(i in arr){print i >"list1output.csv"}}' list1 list2
(refer to image for a more readable format)
This code was submitted... (1 Reply)
Discussion started by: Aussiemick
1 Replies
9. Shell Programming and Scripting
I have the records in the format
one row
0009714494919I MY010727408948010 NNNNNN N PUSAAR727408948010 R007YM08705 9602002 S 111+0360832-0937348
I want to get it int the format
0009714494919I MY010727408948010 NNNNNN N PUSAAR727408948010 R007YM08705 9602002 S ... (2 Replies)
Discussion started by: sonam273
2 Replies
10. Shell Programming and Scripting
I have a script that currently runs fine and I need to add or || (or) condition to the if statement and I'm not sure the exact syntax as it relates to the use of brackets.
my current script starts like this:
errLog="/usr/local/website-logs/error.log"
apacheRestart="service httpd restart"... (3 Replies)
Discussion started by: jjj0923
3 Replies
LEARN ABOUT XFREE86
script
SCRIPT(1) User Commands SCRIPT(1)
NAME
script - make typescript of terminal session
SYNOPSIS
script [options] [file]
DESCRIPTION
script makes a typescript of everything displayed on your terminal. It is useful for students who need a hardcopy record of an interactive
session as proof of an assignment, as the typescript file can be printed out later with lpr(1).
If the argument file is given, script saves the dialogue in this file. If no filename is given, the dialogue is saved in the file type-
script.
OPTIONS
-a, --append
Append the output to file or to typescript, retaining the prior contents.
-c, --command command
Run the command rather than an interactive shell. This makes it easy for a script to capture the output of a program that behaves
differently when its stdout is not a tty.
-e, --return
Return the exit code of the child process. Uses the same format as bash termination on signal termination exit code is 128+n.
-f, --flush
Flush output after each write. This is nice for telecooperation: one person does `mkfifo foo; script -f foo', and another can
supervise real-time what is being done using `cat foo'.
--force
Allow the default output destination, i.e. the typescript file, to be a hard or symbolic link. The command will follow a symbolic
link.
-q, --quiet
Be quiet (do not write start and done messages to standard output).
-t[file], --timing[=file]
Output timing data to standard error, or to file when given. This data contains two fields, separated by a space. The first field
indicates how much time elapsed since the previous output. The second field indicates how many characters were output this time.
This information can be used to replay typescripts with realistic typing and output delays.
-V, --version
Display version information and exit.
-h, --help
Display help text and exit.
NOTES
The script ends when the forked shell exits (a control-D for the Bourne shell (sh(1)), and exit, logout or control-d (if ignoreeof is not
set) for the C-shell, csh(1)).
Certain interactive commands, such as vi(1), create garbage in the typescript file. script works best with commands that do not manipulate
the screen, the results are meant to emulate a hardcopy terminal.
It is not recommended to run script in non-interactive shells. The inner shell of script is always interactive, and this could lead to
unexpected results. If you use script in the shell initialization file, you have to avoid entering an infinite loop. You can use for
example the .profile file, which is read by login shells only:
if test -t 0 ; then
script
exit
fi
You should also avoid use of script in command pipes, as script can read more input than you would expect.
ENVIRONMENT
The following environment variable is utilized by script:
SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed.
(Most shells set this variable automatically).
SEE ALSO
csh(1) (for the history mechanism), scriptreplay(1)
HISTORY
The script command appeared in 3.0BSD.
BUGS
script places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects.
script is primarily designed for interactive terminal sessions. When stdin is not a terminal (for example: echo foo | script), then the
session can hang, because the interactive shell within the script session misses EOF and script has no clue when to close the session. See
the NOTES section for more information.
AVAILABILITY
The script command is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils
/util-linux/>.
util-linux June 2014 SCRIPT(1)