Could you please help me with a shell script that condense in this case each 12 rows of hour information in only one row per day as following:
Final Fields in each row
1.Ticker Name
2. D (Daily)
3. Date
4. Open Price (The open price of the first record of the day)
5. High Price (The high price of all 12 rows of each day)
6. Low Price (The low price of all 12 rows of each day)
7. Close (The close price of the last record of the day)
8. Volume (The sum of all volume fields per day)
Final Result of the rows:
<ticker>,<per>,<date>,<open>,<high>,<low>,<close>,<vol>
EUR_USD,D,11/02/2009,1.4783,1.4844,1.4727,1.4772,11633
EUR_USD,D,11/03/2009,1.4732,1.4631,1.4631,1.4654,12887
The information that I want to process is in the following format:
The final purpose of transform the attached file is to use this data in order to take decisions of trade currencies. I want to convert or condense all rows of each day of the file in one row per day. My intention is to use Ubuntu and a shell script for this case.
Hi,
I have a shell script where a lot of the code is repeated. I wanted to make the code much more compact so I spoke to a guy and he suggested using arrays, like follows:
#!/bin/bash
readonly -a nginx=('nginx' '--prefix=/opt' '-j 4'
'http://nginx.org/download/nginx-1.2.2.tar.gz'
)... (2 Replies)
I need some assistance formatting a compact flash card in Ubtunu.
I connect up the CF card through a USB reader. Ubuntu recognizes the reader usb device, but does not "mount" the CF card as a device.
The CF card was formatted in FAT32 format.
Any help would be greatly appreciated.... (3 Replies)
Hi Experts!!!!
Tried a lot but in vein,no success, please help to achieve this
LOGIC behind is first field is reffrance row field, the second field shoud be made titles of coulmn and the the third field is made as matrix value.
And if they dont match the matrix value should be 0. (Unix (Shell,... (1 Reply)
Hi Guys,
I just started learning unix and was wondering if anyone can assist me with my User info script.The script file lets the user input their personal information (Their name, address, phone number etc...). The script will then ask the user to input the info again if the input is incorrect... (2 Replies)
Hi All,
I Downloaded Oracle 9.2.0.4.0 for Linux AS 4 and the file format is
Directions to extract the files
1. Run "gunzip <filename>" on all the files. Eg. ship_9204_linux_disk1.cpio.gz
2. Extract the cpio archives with the command "cpio -idmv < <filename>" Eg. cpio -idmv... (0 Replies)
:confused: I tryied to use the mount Command (and the msdos.utils) in Darwin 1.4 (OS X) to format a Compact Flash in DOS Format (I had already this native format but I changed it with Disk Utility in MacOS standard and the PC Card slot of a Windows 98-Laptop can't nore read the card) I want to... (1 Reply)