Sponsored Content
Top Forums Shell Programming and Scripting [urgent need help] about script Post 302100642 by reborg on Thursday 21st of December 2006 05:56:28 AM
Old 12-21-2006
Slight amendment to print the count per type

Code:
awk '$12 == "00008001" { 
    cnt++;cs_cd[$11]++ 
} END { 
    printf "Total Count: %s", cnt
    for(cd in cs_cd) {
        printf "%s: %s\n", cd, cs_cd[cd] 
    }
} ' file

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need a Script(Urgent)

sdfggggggggggggggggggggg (7 Replies)
Discussion started by: udayben
7 Replies

2. Shell Programming and Scripting

Script - Urgent Help

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

[urgent need help] unix script....

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

Urgent Script Needed

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

sed script help urgent

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

I want an urgent script

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

(Urgent):Creating flat file using sql script and sqlplus from UNIX Shell Script

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

URGENT Reading a file and assessing the syntax shell script URGENT

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
All times are GMT -4. The time now is 07:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy