Traverse a flatfile and check for errors


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Traverse a flatfile and check for errors
# 1  
Old 04-17-2008
First take a look at Useless Use of Cat and corect your script, second use code tag.
Note: You can edit your original post.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Need in for a script that should check for errors in multiple log file (approx 2500) and should mail

hello everyone, I am new to linux and got this deliverable to write a script that should check for error in multiple log file (count is approx 2500 log files on single server) and once error is found, it should mail that error My logic says: we can put all log files path/location in one... (2 Replies)
Discussion started by: Pratik_CTS
2 Replies

2. Shell Programming and Scripting

Check for “errors” or “ORA-”

I want to check for "errors" or "ORA-" in Y.if there is an error then exit Y=`sqlplus -s user/passwd<< EOF exec test_Proc; exit; EOF` if ; then exit 1 fi but this doesnt work (6 Replies)
Discussion started by: haadiya
6 Replies

3. Shell Programming and Scripting

Generating XML from a flatfile

Hi all, I am trying to generate an XML file from a flatfile in ksh/bash (could also use perl at a pinch, but out of my depth there!). I have found several good solutions on this very forum for cases where the header line in the file forms the XML tags, however my flatfile is as follows:... (5 Replies)
Discussion started by: ianmrid
5 Replies

4. Shell Programming and Scripting

sending output to flatfile

Hi, I am writing one unix script to get row count of few tables into one sequential file my script is like this $ORACLE_HOME/bin/sqlplus -s <<EOF >output.txt userid/password@databasename set verify off set heading off set feedback off select count(*) count from tablel where ; select... (4 Replies)
Discussion started by: spmsarada
4 Replies

5. UNIX for Advanced & Expert Users

Delimeters Count in a FlatFile

Hi, I have the below script to check the count of delimeters for a file (here is File : test.csv Delimeter is ",") awk '{gsub(/"*"/,x);print gsub(/,/,x)}' test.csv And it return the output for each line as: 2 2 cat test.csv: abc,xyz "abc,zxyz",1 I need help one the below things: - IS... (8 Replies)
Discussion started by: venkatajay_18
8 Replies

6. Shell Programming and Scripting

Deleting column from a flatfile with delimiter

I have a set of flatfiles which have columns delimited by #. How can a particular column be deleted in all the flatfiles. All flatfiles have same number of columns. (5 Replies)
Discussion started by: rsprabha
5 Replies

7. What is on Your Mind?

Check this out. Find out the errors as much as possible. thanks

Sorry guys, busy working on a new project these days so I am not able to keep this topic update frequently. Few days earlier I talked to some of my friends in China and understand more about the current situation of China's IT industry. From what they told me and considering my experience and... (6 Replies)
Discussion started by: CULM
6 Replies

8. UNIX for Dummies Questions & Answers

Check my crontab for possible errors.

I'm posting the line I just added to my crontab because it's my first and I want to be sure it's doing what I'm intending it to do. 59 23 0 * 1-5 /export/<many_directories_later...>/scripts/get_clientkpi.sh Supposed to do: Run script at 11:59pm every night, except weekends. Question: If I wish... (4 Replies)
Discussion started by: yongho
4 Replies

9. UNIX for Dummies Questions & Answers

encrypting Unix flatfile

Hi, I am new to unix. I have a flat file that needs to be pgp encyrpted in ASCII format and ftped in Ascii format to remote location. Can any one tell me the steps involved in the pgp encryption of the unix file. I will really appreciate if any one can help me with the pgp encryption shell... (1 Reply)
Discussion started by: rkumar28
1 Replies

10. UNIX for Dummies Questions & Answers

Finding a column in a flatfile

I have a file which is fixed width columns. This is an offset buffer - rather than space or tab delimited. There are upto about 8 columns and I need to get all of the column 5's values into another file. The problem is that because the delimiter is a space - and some fields are blank - the 5th... (3 Replies)
Discussion started by: peter.herlihy
3 Replies
Login or Register to Ask a Question
wcmgr(1)							   The Webalizer							  wcmgr(1)

NAME
wcmgr - Webalizer (DNS) Cache file Manager SYNOPSIS
wcmgr [ option ... ] cache-file DESCRIPTION
wcmgr is a utility program which allows manipulation of the DNS cache files used and produced by The Webalizer. Each record in the cache file contains an IP address (either IPv4 or IPv6), a timestamp of when the entry was added to the cache, a flag to indicate if the record contains a resolved name or not, and either the same IP address or a resolved host name. All records are accessed by their IP address. RUNNING WCMGR
wcmgr was designed to be run from the Unix shell command line. This facilitates its use in shell scripts and other automated processes. A valid DNS cache file must be specified. Command line options are optional, and if none are given, the default action is to list the con- tents of the specified cache file. COMMAND LINE OPTIONS
Different functions are selected by using one or more of the following command line options. If no options are given, the default is to display the contents of the cache file to the screen (stdout). -h Display all available command line options and exit. -v Be verbose. -V Display the program version and exit. Additional program specific information will be displayed if verbose mode is also used (e.g. '-vV'), which can be useful when submitting bug reports. -a address [-n hostname] [-t0] Add a new record to the cache file. The IP address will be added to the cache file using the current time as the timestamp and with a resolved name hostname. If -t0 is specified, the record will be considered permanent, and will not be removed (during a purge) or expired. If a hostname is not specified with the -n option, then the address will be used instead, and the record will be flagged as unresolved. -c Create a new cache file. If used alone, this option will create a new, empty cache file. If used with the import option, a new cache file will be created before importing the data. An error will occur if the file cache-file already exists. -d address Delete a record from the cache file using the specified address. -f address Find and display information for address from the cache file. A single line similar to that produced by the -l option will be dis- played unless verbose mode is enabled, in which case a more detailed listing will be produced. -i name [-c] Import data into the cache file from the file name. The import file must be a valid tab delimited text file, such as that created by the export option. If the imported data contains records already present in the cache file, those records will be overwritten by the imported data. The cache file must exist unless the -c option is specified, in which case, a new cache file will be created for the imported data. -l List the contents of the cache file. This is the default action of the program, so does not necessarily need to be specified. If verbose mode is enabled, a report title, column headers and summary totals will also be displayed. -p num Purge the cache file of entries older than num days. If num is not specified, then a default of 7 days will be used. if verbose mode is enabled, each purged record will be printed and the total number of purged records will be displayed. -s [-t num] Display cache file information/statistics. If a TTL value (in days) is specified using the -t option, it will be used to calculate how many records are older than num days, otherwise, the default value of 7 days will be used. -n name Specify the name to use as the resolved hostname when adding records to the cache. -t num Time to live (TTL) value. If used along with the -p (purge) option, it specifies how many days a record will remain valid. Any record that is older than num days is considered expired and will be purged. If used with the -a (add) option, a zero value will cause the record to be considered permanent. -x name Export data from a cache file to a tab delimited text file named name. If the text file name exists, it will be overwritten. BUGS
Please report bugs to the author. COPYRIGHT
Copyright (C) 1997-2011 by Bradford L. Barrett. Distributed under the GNU GPL. See the files "COPYING" and "Copyright", supplied with all distributions for additional information. AUTHOR
Bradford L. Barrett <brad at mrunix dot net> Version 1.00 12-Jul-2008 wcmgr(1)