12-21-2006
[urgent need help] about script
hi experts,
i'm new on scripting on solaris 8 sparc, need some advices. i have some data in a file like :
20061221 163826.485 20061221 163925.144 058.659 6123456789012 00000E8A 047 08 002 465 00010022 510105642138069
20061221 163915.163 20061221 163925.336 010.173 6123456789012 00000F4F 037 02 002 999 00010022 510103242202784
20061221 163852.363 20061221 163925.549 033.186 6123456789012 00000EED 040 06 002 999 00010022 510105832049518
20061221 163803.035 20061221 163925.708 082.673 6123456789012 00000E26 010 08 002 800 00010022 510105732551708
20061221 163921.293 20061221 163925.787 004.494 6123456789012 00000F6C 039 02 002 999 00008001 510105642169788
20061221 163650.185 20061221 163926.027 155.842 6123456789012 00000D16 051 08 002 465 00008001 510105732672986
20061221 163923.325 20061221 163926.381 003.056 6123456789012 00000F75 062 02 002 123 00008001 510103342614669
example of the data :
20061221 163923.325 20061221 163926.381 003.056 6123456789012 00000F75 062 02 002 123 00008001 510103342614669
underline is shortcode and bold is causes code
the filename is in date format like "2006122001.TDR" and the file generated each hour like 2006122002.TDR,2006122003.TDR,etc. the file log found at /log/TDR/
i want to check into the file (e.g. 2006122000.TDR) line by line and get how much shortcode having causes code "00008001" and generate it into the the file (e.g. 2006122000.log) each hour and count per shortcode how much each short code having causes code "00008001".
how to create some script to to the task?
please advices...
thank you so much
wu
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
sdfggggggggggggggggggggg (7 Replies)
Discussion started by: udayben
7 Replies
2. Shell Programming and Scripting
Hi guys, i really need some urgent help on a few things
I'm an extreme unix novice,
Can you guys please help me with a couple of questions.
I am in no way asking anyone to do it for me, but i am really asking for some extremely in depth help. I know alot of this is very second nature to... (4 Replies)
Discussion started by: troy86
4 Replies
3. Shell Programming and Scripting
hi experts,
i'm new in scripting unix i have some problem with my script below is shown my script :
#!/bin/sh
BASEDIR=/export/home/mapadm
BINDIR=$BASEDIR/bin
LOGDIR=$BASEDIR/log
TDRDIR=$LOGDIR/TDR
BACKUPDIR=/data/log
export BASEDIR BINDIR LOGDIR TDRDIR BACKUPDIR
YEAR=`date '+%Y'`... (21 Replies)
Discussion started by: bucci
21 Replies
4. UNIX for Dummies Questions & Answers
I need shell script code for the following
1. Read syscat.columns after connecting to DB2 using SQL cursor
2. Read the output of the previous SQL command in the shell script
3. Perform insertions and deletions in the output of step 1
Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies
5. Shell Programming and Scripting
Collegues
I am dealing with raw text files which is extracted from web pages.
I have to find sentances which contains more than 99 words and have to put a "." after the 99th or 98 th word .
Is there any possiblity to it in sed or awk
With regards
Jaganadh.H (5 Replies)
Discussion started by: jaganadh
5 Replies
6. Shell Programming and Scripting
Hi
I want a script which reads a file and ftped the content of that file into another server.The file saved in new location as filename.date (3 Replies)
Discussion started by: Renjesh
3 Replies
7. Shell Programming and Scripting
Hi,
I need help urgently for following issue. Pls help me to resolve this issue.
I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql)
I given... (6 Replies)
Discussion started by: praka
6 Replies
8. Shell Programming and Scripting
I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies