Sponsored Content
Top Forums UNIX for Beginners Questions & Answers ksh script to validate the record count status Post 303045405 by sea on Thursday 19th of March 2020 03:32:32 PM
Old 03-19-2020
Hi

Where to beginn with?
* Incorrect LOG assignment
* Not using the $LOG
* Using an unassigned $sh_Trans
* Unrequired use of cat (can use grep for that, just 'add' the filename)
* What is the output/content of $sh_Trans?

And please, just to be sure (as I dont know this detail) in KSH:
Code:
cat  ~/randomfile-$$
echo $?

Because I wonder wether your error code check is working as you intend, or not.

hth
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replaying a record count with another record count

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)
Discussion started by: er_zeeshan05
2 Replies

2. Shell Programming and Scripting

HELP WITH .ksh script converting the exit status

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)
Discussion started by: angusyoung
1 Replies

3. Shell Programming and Scripting

Validate record count

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)
Discussion started by: balaji23_d
6 Replies

4. Shell Programming and Scripting

Help in writing a KSH script to filter the latest record?

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)
Discussion started by: Karpak
4 Replies

5. Shell Programming and Scripting

exit status from ksh script exec from java using runtime

how do i get the exit status from a ksh or perl script executed in a java program using Runtime? (1 Reply)
Discussion started by: twk
1 Replies

6. Shell Programming and Scripting

Exit status of the ksh Script

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)
Discussion started by: saachinsiva
4 Replies

7. Shell Programming and Scripting

Print record count of a file using shell script

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)
Discussion started by: mmeda
1 Replies

8. Shell Programming and Scripting

Validate file count in korn shell script

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)
Discussion started by: aneeta13
6 Replies

9. Shell Programming and Scripting

Any Sample ksh script to validate all the database objects

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)
Discussion started by: srikanth_sagi
2 Replies

10. UNIX for Beginners Questions & Answers

Ssh script to validate ssh connection to multiple serves with status

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
PROCMETER3-LOG(1)					      General Commands Manual						 PROCMETER3-LOG(1)

NAME
procmeter3-log - A system monitoring / logging program. SYNOPSIS
procmeter3-log [-h|--help] [--rc=<filename>] [--...] [...] DESCRIPTION
ProcMeter Displays one or more pieces of information about the operating system and other resources. Most of the information that is dis- played comes from the /proc filesystem. The program is modular and very configurable. OPTIONS
The command line options are described below. -h Provides a help message listing the available outputs. This will be different for different computers depending on the Linux kernel version that is being used and the hardware/software that is configured. --rc=<filename> Load the specified .procmeterrc file in stead of the searching in the usual places. --... A list of configuration file options that will override the values in the .procmeterrc file. The format of these options is (for example) --library.path=/usr/local/procmeter3 which is equivalent to the entry in the .procmeterrc file of [library] path = /usr/local/procmeter3 All spaces around the equal sign must be removed and if spaces are required in the value on the right hand side then quotes must be used around the entire command line option. ... A list of names of outputs that are to be displayed. This can include any of the outputs that are available (see the -h option). For the CPU usage is in a module named Statistics with an output named CPU and there are graph (-g), text (-t) and bar (-b) options. Since this version of the program does not display anything, but logs the data to a file it does not matter which one is chosen. To store the CPU usage data you would use the command line option Statistics.CPU-t USAGE
When started the program will log all of the requested information on the standard output (stdout). The outputs that are displayed are those from the command line and those from the .procmeterrc configuration file. MODULES
The modules that are available for procmeter3-log are described in the procmeter3_modules(1) manual page. SEE ALSO
procmeterrc(5) procmeter3_modules(1) AUTHOR
Andrew M. Bishop 1998-2007 July 3, 2010 PROCMETER3-LOG(1)
All times are GMT -4. The time now is 11:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy