How can I use filters to extract infos?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How can I use filters to extract infos?
# 1  
Old 09-27-2005
Bug How can I use filters to extract infos?

I encountered some complicated problems course studies.

take this for example:

under /home/data/stockdata

we have 1999,2000,2001,.......2004 these sub-dirs

and, each sub-dir has its mothly(for Jan~Dec) transaction records,
i.e. they are all named "foo.txt", like this:

Date Reported Reported Dollar Value Report
(YYYYMMDD) Shares Trades (Millions) Warrants
20041201 1,814,064,993 4,831,438 $60,504.4 143,100
20041202 1,827,212,240 4,752,578 $58,765.8 171,900
20041203 1,616,531,208 4,415,100 $52,247.2 100,000
20041206 1,382,706,054 4,037,349 $44,575.7 47,600
20041207 1,559,078,876 4,502,252 $51,147.6 56,100
20041208 1,583,381,807 4,314,708 $51,443.2 32,700
20041209 1,653,821,567 4,604,882 $53,229.1 14,900
20041210 1,492,678,438 4,085,627 $49,452.7 43,500
20041213 1,482,850,076 4,067,646 $49,550.9 50,100
20041214 1,560,225,424 4,044,484 $51,014.6 59,900
20041215 1,781,564,964 4,315,705 $58,730.0 76,500
20041216 1,828,546,117 4,501,391 $61,874.2 66,400
20041217 2,690,208,018 4,760,662 $89,080.2 113,200
20041220 1,444,379,371 4,177,083 $48,010.5 79,700
20041221 1,514,658,596 4,211,666 $50,352.0 48,700
20041222 1,432,828,621 3,988,031 $48,742.2 20,900
20041223 970,265,038 2,848,277 $33,114.8 20,400
20041227 937,874,825 3,051,715 $31,724.6 14,500
20041228 1,004,285,168 3,052,967 $33,677.0 49,800
20041229 944,707,712 2,880,070 $31,899.6 23,700
20041230 847,366,998 2,673,357 $28,208.8 51,800
20041231 823,660,146 2,546,746 $27,339.3 23,400

Q1.How can we extract infos form these huge amount for data for highest daily volume in terms of Dollar Value from Jan.1999 to Dec 2004 ?

(note: some months may change dollar values from the form provided above to absent of dollar sign , i.e. $123,456 -> 123,456)

Q2.There were consecutive trading days when the exact same number of warrants were being traded. List the years and months when this occurred.

thanks a lot for all your help.

Last edited by virii; 09-28-2005 at 12:08 AM..
# 2  
Old 09-28-2005
Lightbulb the first two line is ....

ths first two lines is:



Date(YYYYMMDD) , Reported Shares, Reported Trades, Dollar Value, Reported Warrents

sorry ! I don't know how to arrange the texts Smilie
# 3  
Old 09-28-2005
Quote:
Originally Posted by virii
I encountered some complicated problems course studies.
Rules says...
(6) Do not post classroom or homework problems.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

Applying filters

I have a value X, a value DX and an odd integer N (say N=9) and want to create an array such that let X = 10, DX = 2 and N = 9 DIST(1) = X - 4 * DX DIST(2) = X - 3 * DX DIST(3) = X - 2 * DX DIST(4) = X - DX DIST(5) = X DIST(6) = X + DX DIST(7) = X + 2 * DX DIST(8) = X + 3 * DX DIST(9)... (2 Replies)
Discussion started by: kristinu
2 Replies

2. Shell Programming and Scripting

Need help in filters

Hi, I have input data. 9214919702; B5; 1;20070216; 9231590437; BY; 1;20070215;9;20091022;12;20091022; 9211765888; AZ; 1;20080802;1;20080802;14;20091027; 9231592590; BY; 1;20070215;9;20091026;9;20091026; 9252412219; MM; 1;20070217; 9214917135; MM; 1;20070215; 9214917056; B5; 1;20070215;... (8 Replies)
Discussion started by: suresh3566
8 Replies

3. UNIX for Advanced & Expert Users

Unix- filters ppt

Hello.. i want a ppt on unix filters.. can anybody gv me d link 4 that?? (1 Reply)
Discussion started by: shweta_babbar
1 Replies

4. UNIX for Dummies Questions & Answers

Difference between filters of ps

Hi I am a newbie to Unix . I am just trying to understand the difference between various filters for ps. Can someoen pelase explain me whta is the difference between using /usr/bin/ps -ef | grep <PID> or <Process name> and /usr/bin/ps -auxwww| grep <PID> or <Process Name>. (1 Reply)
Discussion started by: sillybirdie123
1 Replies

5. UNIX for Dummies Questions & Answers

what is a filter ? WExplain any five filters in unix

what is a filter ? explain any five filters in unix (1 Reply)
Discussion started by: jobym
1 Replies

6. UNIX for Dummies Questions & Answers

filters

how to filter one particular row from one text file and copy it in another? (1 Reply)
Discussion started by: rajanandhini
1 Replies

7. Solaris

Solaris lp printer filters

I don't have much experience with solaris printers. I've created a printer using lpadmin. When I tried to print something, I got a message that there a no filters on the server. I went to docs.sun.com and got a script to add a filter (below) for filter in *.fd;do >name=`basename $filter... (1 Reply)
Discussion started by: soliberus
1 Replies

8. UNIX for Dummies Questions & Answers

IP Filters

Anyone know where I can find good documentation for IPF on the Internet? Thanks, Chuck (1 Reply)
Discussion started by: 98_1LE
1 Replies
Login or Register to Ask a Question