11-16-2006
use
#! /usr/bin/ksh
while read line
do
hostname=`echo $line | cut -d" " -f1`
port=`echo $line | cut -d" " -f2`
sid=`echo $line | cut -d" " -f3`
echo "PSP1-SUN056.WORLD =\n (DESCRIPTION = \n (ADDRESS_LIST =" >>oraconn
echo "(ADDRESS = (COMMUNITY = TCP)(PROTOCOL = TCP)(HOST = $hostname)(PORT = $por
t))\n )\n (CONNECT_DATA =\n (SID= $sid\n)\n)" >>oraconn
done < $1
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
. I wrote shell script with help to extract data and generate report . I need help to modify that in sub section .
Currently I am generating the report in this format
Version Name Host Total Number of Fails
10 Animator 45
10 Krachel ... (0 Replies)
Discussion started by: getdpg
0 Replies
2. Shell Programming and Scripting
Hi Guys,
I need to write a shell script, to which I have getting results from CPU and Memory Utilization. This is to generate automatically through Shell script by running cron job. Is it possible to write it. I am new to this shell scripting.
Can you please help me on this ASAP.
... (6 Replies)
Discussion started by: lakshmanrk
6 Replies
3. Shell Programming and Scripting
I'm trying to read a bunch of log files and output the lines that contain particular strings.
To accomplish this, I've been running the following from the command line:
find . -name "*" | xargs grep " " | grep " " > output.txt
Two grep statements are needed in case I'm looking for a... (3 Replies)
Discussion started by: Rally_Point
3 Replies
4. Shell Programming and Scripting
Hi ,
i need to write a script
like this
In 1.sh
./test.sh
wait(5sec)
send ctrl+C to server
./testxxxx.sh
first i need invoke test.sh from 1.sh , after wating for some time i need to close the test.sh script & i need to start new script
i tried to invoke script... (2 Replies)
Discussion started by: pvr_satya
2 Replies
5. Shell Programming and Scripting
Hi All,
How to write a shell script
1. i have file name "/home/krupa"(krupa)
2. i have to wite a shell scripting ,
3.script will not execute until reach "krupa" file in the location "/home/krupa"(krupa) and it will wait or go to sleep mode
3. if already "krupa" is there then execute the... (4 Replies)
Discussion started by: krupasindhu18
4 Replies
6. Shell Programming and Scripting
Hi, I need some help to write a script
i need to write script that will count the no of logs generated for the day and specify the logfiles names which is not generated for the day.
Default no of log generate per day is 29
if less than 29 logs generated it should specify the perticular logfile... (7 Replies)
Discussion started by: mail.chiranjit
7 Replies
7. Shell Programming and Scripting
Hi,
I need to write a statement which will read a data from a specific line based on condition and then read related lines to delete.
For example:
|T20150322
100930290
208940000
598000080
700000000
930000202
100000000
.T56789
|T20150322
0100000000
0200000000
0500000000
9000000000... (1 Reply)
Discussion started by: abhi.mit32
1 Replies
8. UNIX for Dummies Questions & Answers
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
9. Shell Programming and Scripting
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
10. Shell Programming and Scripting
Please help me to write the shell script
AC|NAME|STATE|MAXVALUE|MINVALUE---------heading
111|UMA|ODISHA|123,00.00|54.00
111|UMA|ODISHA|124,00.00|25.00
111|UMA|ODISHA|114,00.00|58.00
111|UMA|ODISHA|104,00.00|00.00
111|UMA|ODISHA|194,00.00|19.00
111|UMA|ODISHA|184,00.00|64.00... (5 Replies)
Discussion started by: alokjyotibal
5 Replies
LEARN ABOUT NETBSD
script
SCRIPT(1) BSD General Commands Manual SCRIPT(1)
NAME
script -- make typescript of terminal session
SYNOPSIS
script [-adfpqr] [-c command] [file]
DESCRIPTION
script makes a typescript of everything printed 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 all dialogue in file. If no file name is given, the typescript is saved in the file typescript.
Option:
-a Append the output to file or typescript, retaining the prior contents.
-c command
Run the named command instead of the shell. Useful for capturing the output of a program that behaves differently when associated
with a tty.
-d When playing back a session with the -p flag, don't sleep between records when playing back a timestamped session.
-f Flush output after each write. This is useful for watching the script output in real time.
-p Play back a session recorded with the -r flag in real time.
-q Be quiet, and don't output started and ended lines.
-r Record a session with input, output, and timestamping.
The script ends when the forked shell exits (a control-D to exit 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.
ENVIRONMENT
The following environment variable is used 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).
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.
BSD
October 17, 2009 BSD