Hi all,
I have a file of the following format -
EXPRPT:SCN:1.1706E+10:SEQ_START:121652:SEQ_END:121664:0
( This file name is variable and changes daily)
Now in the same directory I have another set of files of the format -
EXPRPT.log.0001.0000121669
Now what I am trying to do is to ... (2 Replies)
here is a small script:
if ; then
echo please enter an argument
fi
if [ "$1" = "tom"; then
a=$1
echo $a
fi
here is my question. if the script name is j.sh and I run it : j.sh from shell prompt: without a parameter: it prints please enter an argument but if I go with . j.sh (current... (1 Reply)
Hi,
I am new to unix shell scripting. I just want a little script to check the no. of processes are equal to 8, then echo a successful message otherwise echo a unsuccessful message. Please help.
Thanks. (3 Replies)
The following Script takes each extension and determine what category it
belongs and then moves it into a directory based on the extension.
(for eg. 1.sh, 5.sh, 9.sh together; 4.csh, 120.csh, 6.csh together and 7.ksh, 2.ksh, 59.ksh together) and moves them to their respective directories viz.... (2 Replies)
#!/bin/ksh
for i in *.log*
do
ls $i|sed 's/\.log$//g' | while read file
do
echo "file $file is Running" >> lls.txt
echo "***************">> lls.txt
done
done
------------------------------------------------------------------
the output is :
file AdapterCCProvisioningInterface... (9 Replies)
I need to write a small shell script which does the following :
I have a file : root/var/log/ocmp/ocmpclient.log
This is a log file which is continuosly getting updated . I have to keep looking into this file all the time. I have to look for four keywords, "File Detected", File Sending",... (2 Replies)
Hello all,
i have a batmail process running on my machine(java process).
i just need a script we should detect whether the batchnail is running or not.If not it should restart it.
Can anyone assist me on this? (1 Reply)
Hello all, could somebody help..?
I have following 6 files (with white spaces in their names)
This is file
This is file1
This is file2
This is file3
This is file4
This is file5
This is file6
I tried to run the below script, and it did not give me desired ouput..
$ for i in `ls -1`
>... (7 Replies)
Hi Guys,
I need to understand below scipt:-
-bash-3.00$ cat rsync-copy.ksh
#!/usr/5bin/ksh
batch <<%EOF%
echo "/usr/local/bin/rsync --rsync-path=/usr/local/bin/rsync -a --stats /usr/openv/ /OpenvBCK" > openv.LOG
# CG /usr/local/bin/rsync ... (6 Replies)
Discussion started by: manalisharmabe
6 Replies
LEARN ABOUT DEBIAN
amservice
AMSERVICE(8) System Administration Commands AMSERVICE(8)NAME
amservice - run an amanda service on a client
SYNOPSIS
amservice [-f input_file [-s]] [-o configoption...] hostname auth service
DESCRIPTION
Amservice execute an Amanda service on a client. It can be used without amanda server configuration (amanda.conf and disklist). It can be
used to check communication between a server and a client. Amservice reads stdin to capture the REQ packet to send to the client.
See the amanda(8) man page for more details about Amanda.
OPTIONS
hostname
The hostname of the client.
auth
The auth to use, one of: bsd, bsdudp, bsdtcp, ssh, rsh or krb5. The client must be configured with this auth.
service
The amanda service to execute on the client. One of noop, selfcheck or sendsize.
-f input_file
Use the file input_file instead of stdin to read the REQ packet from.
-s
Redirect the first connected stream to stdin/stdout. The -f argument is required for the REQ packet, the REP packet is not printed on
stdout.
-o configoption
See the "CONFIGURATION OVERRIDE" section in amanda(8).
EXAMPLE
The noop service is easy to execute because it does not require a REQ packet:
amservice hostname bsdtcp noop < /dev/null
The example executes the noop service on the client using bsdtcp auth. This is useful for debugging connection problems. It print an
OPTIONS line upon success.
It is more difficult to execute the selfcheck or sendsize service, as these require a valid REQ packet. If you have already uccessfully run
amanda, you can find valid REQ packets in the amandad.*.debug files.
EXIT CODE
The exit code of amservice is one of:
0 = success
1 = error executing amandad on the client.
As amservice doesn't parse the REP packet, it can only detect failures in executing amandad on the client. amservice can exit with value 0
even if the user is not authorized to execute the service. An error message will be printed.
SEE ALSO amanda(8), amanda(8), amcheck(8), amdump(8), amadmin(8)
The Amanda Wiki: : http://wiki.zmanda.com/
AUTHOR
Jean-Louis Martineau <martineau@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Amanda 3.3.1 02/21/2012 AMSERVICE(8)