Sponsored Content
Full Discussion: Help needed in a Batch File
Top Forums Shell Programming and Scripting Help needed in a Batch File Post 302285360 by pmm on Sunday 8th of February 2009 08:54:17 PM
Old 02-08-2009
Not sure exactly what you are asking, but looking at the log file, you can process it further with following nawk script to give you the resultant STATUS line:

Code:
nawk '
BEGIN { TOTAL=0
         OK=0
         NO_CHANGE=0
         ERROR=0 }
/No changes to your repository are required/ { TOTAL++; NO_CHANGE++ }
/are imported/ { TOTAL++; OK++ }
/not imported/ { TOTAL++; ERROR++ }
END { print "STATUS: Total Files: " TOTAL ", Successful Imports: " OK ", Failed Imports: " ERROR ", No Change: " NO_CHAN
GE } ' import_sif_SCRM1SI.log

This gives output:

Quote:
STATUS: Total Files: 2, Successful Imports: 0, Failed Imports: 0, No Change: 2
 

9 More Discussions You Might Find Interesting

1. IP Networking

batch file

my requirment is i have to call a batch file from a c++ program that batch file is called with the argument as print.txt print.txt is a text file which should get printed on printer (any printer) when a batch file call is made 1) how to call a batch file in c++ 2) how to print the text... (1 Reply)
Discussion started by: ramneek
1 Replies

2. Programming

batch file

what is a command to call a batch file from a c++ program when called with the argument which is a text file, then how to print that text file on a printer. please help me with code if possible (3 Replies)
Discussion started by: ramneek
3 Replies

3. UNIX for Dummies Questions & Answers

Telnet in batch file

hi how can i connect to a telnet session using the unix script... need to create a batch file which has to run daily. first it has to telnet to a IP then execute certain commands and log the session. thanks Aemu (1 Reply)
Discussion started by: aemunathan
1 Replies

4. UNIX for Advanced & Expert Users

Batch file question

EDIT: Is this wrong thread? Hi I am on an Apple Mac and I am trying to run this batch file on my Mac and was wondering if anyone could tell me what a script that will make this run and work on my Mac. I was hoping that you could tell me the script in the shell format? So here's the batch... (4 Replies)
Discussion started by: Billy5555100
4 Replies

5. Shell Programming and Scripting

Simple Batch File Help Needed

I have access to a large unix parallel computing cluster. To submit jobs I simply run a script called "submit" followed by options relevant to that particular job. Very simple and easy, "submit" can be run from any directory. I am trying to make a batch file that automatically runs "submit"... (5 Replies)
Discussion started by: cpabrego
5 Replies

6. Shell Programming and Scripting

Batch file to remove double quotes from a file

Hi I have to create a windows batch file which will read an input file and remove "double quotes" from each line of the file. For eg.If input file name is abcd.csv and contents is : "asasd,123123,213213,asd" "esfrf,dsfsdf,234324,sdfsdf" Then the batch file should remove "" from the... (11 Replies)
Discussion started by: akashtcs
11 Replies

7. UNIX for Advanced & Expert Users

batch file

Hi all I am using tru64 Unix and I want a ready batch file which makes me to change all user passwords at the same time ,instead of changing everyone separately. Please could anyone help me to do that. bye. (1 Reply)
Discussion started by: ahmedbashir
1 Replies

8. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

9. Windows & DOS: Issues & Discussions

Batch file and perl

I have created a windows batch file to run a bash with perl commands in it: @echo off C: chdir C:\cygwin\bin\ bash --login -c "./windows_annovar.pl" exit 0 In the pl file attached the menu opens and the user makes a selection and cygwin closes. There are error messages on the... (15 Replies)
Discussion started by: cmccabe
15 Replies
FILELOG(5)							AFS File Reference							FILELOG(5)

NAME
FileLog - Traces File Server operations DESCRIPTION
The FileLog file records a trace of File Server (fileserver process) operations on the local machine and describes any error conditions it encounters. If the FileLog file does not already exist in the /var/log/openafs directory when the File Server starts, the server process creates it and writes initial start-up messages to it. If there is an existing file, the File Server renames it to FileLog.old, overwriting the existing FileLog.old file if it exists. The file is in ASCII format. Administrators listed in the /etc/openafs/server/UserList file can use the bos getlog command to display its contents. Alternatively, log onto the file server machine and use a text editor or a file display command such as the UNIX cat command. By default, the mode bits on the FileLog file grant the required "r" (read) permission to all users. The File Server records operations only as it completes them, and cannot recover from failures by reviewing the file. The log contents are useful for administrative evaluation of process failures and other problems. SEE ALSO
UserList(5), bos_getlog(8), fileserver(8) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 FILELOG(5)
All times are GMT -4. The time now is 11:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy