Apologize for the delay in response. Here are the little bit detailed code snippet where it starts with execution of procedure and check the error and execution status and then transmits the file.where in the proc1, it's checking the condition that if the rejected record is more than 0 then it assigns the value of errcode as 100 and setting user defined message for errmsg. Now i'd like to transmit the file even there is any rejection of records.
i use unix command to take the record count for a file1
awk 'END{print NR}' filename
i already have a file2 which conatin the count like
...
..
rec_cnt=100
..
..
I want to replace the record in the file2 using the record i take from file1.
suggest me some simple ways of doing it... (2 Replies)
Hi
Can someone help me please?
In a standard UNIX .ksh script, if you have the exit status..say 5...what line do you have to enter into the script for this number to be automatically converted to its actual exit reason by looking up the exit status file...wherever that is?
thanks
angus (1 Reply)
Hi all
How to verify the number of records in case of delimited file, If the file has records. And then if it is not equal to mentioned no. of records, email is triggered and file is moved to bad directory path.
Example
-----
input file = a.txt
bad directory path : /usr/bin/bad (6 Replies)
Hi All,
I have a text file with the folowing content.
BANGALORE|1417|2010-02-04 08:41:04.174|dob|xxx
BANGALORE|1416|2010-02-04 08:23:19.566|dob|yyy
BANGALORE|1415|2010-02-04 08:20:14.497|dob|aaa
BANGALORE|1414|2010-02-04 08:19:40.065|dob|vvv
BANGALORE|1413|2010-02-04... (4 Replies)
Hi
Im trying to write a script that will archive some file using java program.Below is the part of the script that I use and my problem is that the script always return with status 0.Below is part of my script(end part)
purge.ksh
echo "No of files before tar :... (4 Replies)
HI,
I need to print the record count of a file using shell script.
If the record count of a file excluding header and trailer record if greater than zero then print 'Record count of a file is xxxx records'.
If the record count is zero print 'zero records'
Thanks
Mahendra (1 Reply)
Hi,
I have files in the directory like below which I need to validate if all the required files are present.
A_B_001 of 002_time1.txt
A_B_002 of 002_time1.txt
A_B_001 of 001_time2.txt
Scenarios-
a)If file with 001 of 002_time1 or 002 of 002_time1 is missing in the folder,script should... (6 Replies)
Hi,
I need a sample script to validate all the database objects like
1. table structure(columns, datatypes,key contraints if any)
2. synonyms
3. grants
4. indexes
....etc
thank you! (2 Replies)
Hi,
I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not...
I have .sh script like below and i have servers.txt contains all the list of servers
#/bin/bash
for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies
LEARN ABOUT DEBIAN
aoeping
aoeping(8) System Manager's Manual aoeping(8)NAME
aoeping - simple communication with AoE device
SYNOPSIS
aoeping [options] {shelf} {slot} {netif}
DESCRIPTION
The aoeping(8) program performs simple one or two-round-trip communication with an ATA over Ethernet (AoE) device. It creates and receives
AoE packets directly, using raw network sockets.
Running aoeping(8) without command line arguments will result in a short usage summary being displayed.
The aoeping(8) program will wait forever if it doesn't receive an expected response. The caller should use a time out to catch this situa-
tion.
Arguments
shelf This should be the shelf address (major AoE address) of the AoE device to communicate with.
slot This should be the slot address (minor AoE address) of the AoE device to communicate with.
netif The name of the ethernet network interface to use for AoE communications, e.g., eth1.
Options
-i Issue an ATA "identify device" command after receiving the AoE device's Config Query response. The "ident" response will be printed
on standard output as a hexidecimal dump.
-I Issue an ATA "identify device" command after receiving the AoE device's Config Query response. The "ident" response will be pretty-
printed on standard output as selected human-readable fields.
-v Turn on more copious output, including a hexidecimal dump of the Config Query response from the AoE device (see AoE spec at URL
below).
-s This option takes an argument. The argument is a decimal integer that specifies the number of seconds that aoeping(8) will wait for
a response before timing out and exiting with a non-zero status.
-S This option takes an argument. The argument is the name of a SMART command to send to the disk. The SMART commands in the list
below are supported. If the command requires data transfer, one sector (512 bytes) of data is always the amount transfered. If the
command takes a parameter (for the Low LBA register), then the name of the SMART command is immediately followed by a colon and then
a number, the value of the parameter, e.g., "-S read_log:1".
read_data
offline_immediate
read_log
write_log
enable
disable
return_status
For write_log, aoeping(8) reads from standard input the one sector of data to be written to the specified log.
If the AoE device does not support SMART commands or if the command is aborted, an error message is printed to standard error and
aoeping(8) exits with a non-zero status. A command may be aborted if SMART is disabled on the device.
The aoeping(8) command just sends and receives SMART commands, without interpreting them. See the ATA specification for more infor-
mation on using SMART.
-t (This is an advanced feature.) This option has an argument. The argument is a decimal integer that is used as the initial tag,
with the highest bit set, as the first tag in ATA commands. Tags for subsequent ATA commands will be incremented by one.
-h Show a usage summary.
EXAMPLE
In this example, the root user uses aoeping(8) to check for the presence of aoe device e10.9 on network interface eth0.
bash# aoeping -v 10 9 eth0 | head
tag: 80000000
eth: eth0
shelf: 10
slot: 9
config query response:
00 0d 87 aa c9 00 00 10 04 00 11 1f 88 a2 18 00
00 0a 09 01 00 00 00 00 00 03 30 08 00 10 00 04
66 6f 6f 0a 00 ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
The next example shows root making sure the disk on the e10.9 is still responsive by issuing an ATA device identify command with a 20-sec-
ond timeout.
bash# aoeping -i -s 20
10 9 eth0 > /dev/null
&& echo ok
ok
The next example uses SMART to determine whether the disk on e10.9 thinks it has exceeded its error threshold. The ATA spec says that the
LBA Mid register will be 0x4f when the disk has not exceeded its error threshold.
bash# aoeping -S return_status
10 9 eth0 | grep 'LBA Mid: 0x4f'
> /dev/null
&& echo ok
ok
Note that in a script, it would be prudent to specify and handle a timeout. Also, a good script would make sure the Status register does
not have the error bit (bit zero) or the device fault bit (bit 5) set.
SEE ALSO aoe-discover(8), aoe-interfaces(8), aoe-mkdevs(8), aoe-mkshelf(8), aoe-stat(8),
AoE (ATA over Ethernet): http://support.coraid.com/documents/AoEr10.txt,
ATA specification
AUTHOR
Ed L. Cashin (ecashin@coraid.com)
aoeping(8)