Sponsored Content
Full Discussion: AWK issue--> Help requested
Top Forums Shell Programming and Scripting AWK issue--> Help requested Post 302108476 by reborg on Monday 26th of February 2007 09:52:59 PM
Old 02-26-2007
Completely untested:

Code:
#!/bin/ksh

# Check if totals match with control file.
# Usage ./compresser.sh <pattern>

ttt="ism_control_$1.dat"
echo "Control File=$ttt"

OIFS=$IFS
IFS=,

while read t1 junk sumt1 more_junk; do
    typeset -l t2
    t2="ism_${t1}_${1}.dat"    
    sumt2=$(wc -l $t2)
    
     if [[ $sumt1 -eq $sumt2 ]]; then
       continue
     else mailx -s "$t1 $t2 sums unmatched" abc@abc.com
       echo "Sum matching error!"
     exit 1
     fi
     
done < $ttt

IFS=$OIFS

exit 0

 

10 More Discussions You Might Find Interesting

1. Email Antispam Techniques and Email Filtering

help requested: procmail receipes

Hello all. I want some help procmail receipe. I tried to get some mails' sender and receiptient. Then tried to send them a bash script. But it didnot work. I try a lot of variation of the below receipe. Could anyone can help what is wrong on my receipe? Or if the recepie is correct what can be... (0 Replies)
Discussion started by: kedi
0 Replies

2. Solaris

Your Opinion requested

Ladies/Gentlemen, I am looking for a web-based tool to keep track of my Sun inventory. The following list of fields are fields I would like to store: Root Passwd (needs to be secure) / Hostid / Console Port / IP Address / Platform / Application / Hostname . . . you get the point. Do any of... (4 Replies)
Discussion started by: pc9456
4 Replies

3. UNIX for Advanced & Expert Users

assistance requested (sed related)

I gotta write a command to change the accounts in /etc/passwd that use a shell other than the bash to bash shell. those accounts that dont use a shell shouldnt get modified. assuming all the shell programs end in sh and other programs dont. and the result should go into /etc/passwd.rev any hint? (4 Replies)
Discussion started by: metalwarrior
4 Replies

4. Shell Programming and Scripting

Help requested for a script with sed

Hello Folks, I would very much appreciate if I could get help/suggestions on a particular sed usage. I have to write a script to take version info from a version file, compute the image name, print error if the image does not exist. The version file looks like below: " # # version.cfg #... (3 Replies)
Discussion started by: fatimap
3 Replies

5. Shell Programming and Scripting

Newbie bash scripting help requested

Hi, I'm very new to bash scripting and Linux in general. I'm running Ubuntu Server 10.04 and trying to write a bash script to launch a program. In doing so, I've come across a couple of things that I obviously don't understand. Here is a short script that exemplifies those things: ... (9 Replies)
Discussion started by: Carson Dyle
9 Replies

6. Shell Programming and Scripting

Help on sed requested

Hi I have a problem to resolve, I think sed is the best option, and I am not successful yet. Have a UNIX file which has records as of the 2 character state codes like NY NJ PA DE From the file I need to create this as a variable in the same script or another file -... (7 Replies)
Discussion started by: snair2010
7 Replies

7. Forum Support Area for Unregistered Users & Account Problems

Sign in issues -- additional info as requested

User name: Michael Mullig <removed email addresses> (1 Reply)
Discussion started by: Mike Mullig
1 Replies

8. Shell Programming and Scripting

Variable value substitution issue with awk command issue

Hi All, I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command. The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies

9. Shell Programming and Scripting

SQL Script HELP Requested.

Hello ALL , i am requesting help on for this script i am preparing to get the result of a query in a excel sheet : current Error: Script : NO Excel file created. requesting to know where i am going wrong. #!/bin/ksh... (2 Replies)
Discussion started by: anirudhkashikar
2 Replies

10. IP Networking

The requested URL was rejected. Please consult with your administrator

Ggod evening. I need your help please, in a Production system there is a process that download a xls file from an URL which is IMF(International Monetary Fund) and afterwards to be loaded into a databse table. When testing conectivity from a unix server to IMF seems to work but when editing it... (9 Replies)
Discussion started by: alexcol
9 Replies
ttt(1)									net								    ttt(1)

NAME
ttt - Tele Traffic Tapper - a standalone program for local, real-time, graphical traffic-monitoring. SYNTAX
ttt [-interface device] [-interval ms] [-dumpfile file [-speed N]] [-yscale (K|M|n)] DESCRIPTION
ttt is the standalone traffic monitor program in the ttt program suite. It displays trafic-data of a local interface. To run ttt, you must be "root" on most systems since only root is allowed to access the network filter device. The ttt program suite is yet another descendant of tcpdump but it is capable of real-time, graphical, local and remote traffic-monitoring. It won't replace tcpdump, rather, it helps you find out what to look into with tcpdump. OPTIONS
-interface device specifies the interface for packet capture. If not specified, the default interface is chosen. -interval ms Sets the interval in Milliseconds. If omitted, a interval of 1000 msec. is used as default. -dumpfile file [-speed N] use a dumpfile (produced by "tcpdump -w") as input. The speed option specifies the acceleration factor of the replay speed. -yscale ('K'|'M'|n) change the scale of y-axis. 'K' and 'M' represent 1000 and 1000000 respectively. EXAMPLES
To run this program the standard way type: ttt To listen only on interface eth0: ttt -interface eth0 AUTHORS
ttt was written by Kenjiro Cho < kjc@csl.sony.co.jp>. This manual page was written by Thomas Scheffczyk <thomas.scheffczyk@verwaltung.uni-mainz.de>, for the Debian GNU/Linux system (but may be used by others). SEE ALSO
tttview(1), tttprobe(1) Kenjiro Cho 1.7 ttt(1)
All times are GMT -4. The time now is 11:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy