Hi,
I've a shell script e.g.
#!/bin/bash
echo "Enter the next hop id"
read nhid
echo "enter the IP address"
read IP
echo "enter the interface name"
read name
echo "enter the enable/disable state"
read state
exit 0
now from this script i want to search strings in another (.cam)
... (6 Replies)
Hi,
We Perfrom Loads to the database through a Perl script which generates a statistics file. I need to read the statistics. the Statistics file looks something like below:
Process Beginning - 08-26-2010-23.41.47
DB2 CONNECTION SUCCESSFUL!
Ready to process and load file: FILENAME
# of... (2 Replies)
File name : Sample.txt
Actually i would like to read <schema>Oracle<schema> string from input file and return only once database as my output.
Please advise me.
Moved to appropriate forum. (1 Reply)
Hi everyone,
I am new to Unix and need help writing a script that can ask user for an input, then search that input within a file
I know will have to use the read and grep commands, anyone can give me somewhere to start would help
Task: Write a script to display... (1 Reply)
Hi everyone,
I am new to Unix and need help writing a script that can ask user for an input, then search that input within a file
I know will have to use the read and grep commands, anyone can give me somewhere to start would help
Task: Write a script to display which volume pool a given... (1 Reply)
Hi Don, this is not homework question. I work for a Credit card company and my development goal this year is to learn Unix. I would love if others can help me get started, thanks.
Hi everyone
I am new to Unix and need help writing a script that can ask user for an input, then search that input... (2 Replies)
Hello All
I have a pattern.txt file in source directory ((/project/source/) in linux server and data looks like:
123abc17
234cdf19
235ifg20
I have multiple log files in log directory (/project/log/) in linux server and data for one log file looks like:
<?xml version="1.0" processid... (11 Replies)
So, there is a large file where I have to conduct several search using bash shell scripting.
The file is like this:
TITLE and AUTHOR ETEXT NO. Aspects of plant life; with special reference to the British flora, 56900 by Robert Lloyd... (1 Reply)
I have a text file which is generated when the batch job is run. This batch may take few mins to run. When completed, the last line of the text file would be process completed. I need a shell script which will wait for this file till the process completed is printed in it, once found, it would move... (2 Replies)
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
LEARN ABOUT XFREE86
scotty
scotty(1) Tnm Tcl Extension scotty(1)__________________________________________________________________________________________________________________________________________________NAME
scotty - A Tcl shell including the Tnm extensions.
SYNOPSIS
scotty ?fileName arg arg ...?
_________________________________________________________________DESCRIPTION
scotty is a Tcl interpreter with extensions to obtain status and configuration information about TCP/IP networks. After startup, scotty
evaluates the commands stored in .scottyrc and .tclshrc in the home directory of the user.
SCRIPT FILES
If scotty is invoked with arguments then the first argument is the name of a script file and any additional arguments are made available to
the script as variables (see below). Instead of reading commands from standard input scotty will read Tcl commands from the named file;
scotty will exit when it reaches the end of the file.
If you create a Tcl script in a file whose first line is
#!/usr/local/bin/scotty2.1.11
then you can invoke the script file directly from your shell if you mark the file as executable. This assumes that scotty has been
installed in the default location in /usr/local/bin; if it's installed somewhere else then you'll have to modify the above line to match.
Many UNIX systems do not allow the #! line to exceed about 30 characters in length, so be sure that the scotty executable can be accessed
with a short file name.
An even better approach is to start your script files with the following three lines:
#!/bin/sh
# the next line restarts using scotty
exec scotty2.1.11 "$0" "$@"
This approach has three advantages over the approach in the previous paragraph. First, the location of the scotty binary doesn't have to
be hard-wired into the script: it can be anywhere in your shell search path. Second, it gets around the 30-character file name limit in
the previous approach. Third, this approach will work even if scotty is itself a shell script (this is done on some systems in order to
handle multiple architectures or operating systems: the scotty script selects one of several binaries to run). The three lines cause both
sh and scotty to process the script, but the exec is only executed by sh. sh processes the script first; it treats the second line as a
comment and executes the third line. The exec statement cause the shell to stop processing and instead to start up scotty to reprocess the
entire script. When scotty starts up, it treats all three lines as comments, since the backslash at the end of the second line causes the
third line to be treated as part of the comment on the second line.
VARIABLES
Scotty sets the following Tcl variables:
argc Contains a count of the number of arg arguments (0 if none), not including the name of the script file.
argv Contains a Tcl list whose elements are the arg arguments, in order, or an empty string if there are no arg arguments.
argv0 Contains fileName if it was specified. Otherwise, contains the name by which scotty was invoked.
tcl_interactive Contains 1 if scotty is running interactively (no fileName was specified and standard input is a terminal-like device), 0
otherwise.
PROMPTS
When scotty is invoked interactively it normally prompts for each command with ``% ''. You can change the prompt by setting the variables
tcl_prompt1 and tcl_prompt2. If variable tcl_prompt1 exists then it must consist of a Tcl script to output a prompt; instead of out-
putting a prompt scotty will evaluate the script in tcl_prompt1. The variable tcl_prompt2 is used in a similar way when a newline is typed
but the current command isn't yet complete; if tcl_prompt2 isn't set then no prompt is output for incomplete commands.
SEE ALSO
Tnm(n), Tcl(n)
AUTHORS
Juergen Schoenwaelder <schoenw@cs.utwente.nl>
Tnmscotty(1)