05-10-2015
Thanks But i m very new to shell scripting ....can u plz post me entire code after change..plz
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Suppose u have a file like
1 30
ABCSAAHSNJQJALBALMKAANKAMLAMALK
4562676268836826826868268468368282972982
2863923792102370179372012792701739729291
31 60... (8 Replies)
Discussion started by: cdfd123
8 Replies
2. Shell Programming and Scripting
how can i print the output of the shell script in bigger size
eg: echo " hello world"
i want to print this in the output with bigger size in the middle of the screen.
can someone please help me out in that (2 Replies)
Discussion started by: mail2sant
2 Replies
3. UNIX for Dummies Questions & Answers
Hi I am working in Solaris 10 and I want to monitor logs for every telnet/ssh session that tries to connect to the server. I need these logs to be generated in a file that I can fetch using ftp.
I am a new user and a stepwise detail will be great
BR
saGGee (3 Replies)
Discussion started by: saggee
3 Replies
4. UNIX for Advanced & Expert Users
All,
PLease can you help me with a shell script which can compare two xml files and print the difference to a output file.
I have attached one such file for you reference.
<Group>
<Member ID=":Year_Quad:41501" childCount="4" fullPath="PEPSICO Year-Quad-Wk : FOLDER.52 Weeks Ending Dec... (2 Replies)
Discussion started by: kanthrajgowda
2 Replies
5. Solaris
Hello, it is my first post :)
I need to implement some monitoring tools in a script, ping telnet traceroute
I found this one to ping, it works,
#!/bin/sh
for i in `cat /tmp/PingStatus.txt`
do
ping -c 5 -w 5 -n $i | grep -q "bytes from" && echo "$i is OK" || opcmsg object=PING a=OS... (5 Replies)
Discussion started by: marmellata
5 Replies
6. Shell Programming and Scripting
Hi All,
I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file.
Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies
7. Shell Programming and Scripting
HI,
I have a file serverlist in that all host names are placed.
i have written a small script
#./testping
#! /bin/bash
for i in `cat serverlist`
do
ping $i >> output.txt
done
so now it creates a file output.txt till here fine..
now each time i run this script the output file... (4 Replies)
Discussion started by: madhudeva
4 Replies
8. Shell Programming and Scripting
HI,
I want to connect to database and fetch the count from a table.
The sql query is as below :
select count(*) from table_test where test_column='read';
How can I print the output of this statement using shell script.
Thanks in advance. (4 Replies)
Discussion started by: confused_info
4 Replies
9. Shell Programming and Scripting
#! /bin/ksh
#] && . ./.profile 2>/dev/null
if test -f '.profile'; then . ./.profile; fi;
#. .profile
LOG_DIR=/app/rpx/jobs/scripts/just/logs
sendEmail()
{
pzCType="$1"; pzTitle="$2"; pzMsg="$3"; pzFrom="$4"; pzTo="$5"; pzFiles="$6"; pzReplyTo="$7"
(
... (4 Replies)
Discussion started by: ankit.mca.aaidu
4 Replies
10. Shell Programming and Scripting
Hi
I did the following script to ping multiple servers, but I keep on receiveing duplicate emails for one server that is down:
#!/bin/bash
date
cat /var/tmp/servers.list | while read output
do
ping -c 1 "$output" > /dev/null
if ; then
echo "node $output is up"
else
... (10 Replies)
Discussion started by: fretagi
10 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