Sponsored Content
Top Forums Shell Programming and Scripting Poker: calc profit in tournaments Post 302412396 by Corona688 on Monday 12th of April 2010 11:49:41 AM
Old 04-12-2010
Sorry, didn't see your reply. Yes, one file makes it much easier and gets rid of many potential errors.

Code:
#!/bin/bash

while IFS=":" read NAME A B
do
        echo "Profit for ${NAME}:$((A-B))"
done < filename

 

2 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Non Profit UNIX Foundation

I'm considering asking Silk Road to pay an attorney to set up a non-profit public UNIX foundation (and perhaps asking the trustee to donate this domain to that non-profit foundation). A public foundation could receive tax deductable contributions and we could use the funds to build some of the... (5 Replies)
Discussion started by: Neo
5 Replies

2. Shell Programming and Scripting

date calc

Hi, I need subtract two date values (which are in day of the year format) and the output would give the remaining days. using the command date +"%j" i would get today's 'day of the year' i.e., > date +"%j" 256 Next, i need to take input of a previous date in the format 09/05/2012 and then... (4 Replies)
Discussion started by: sam_bd
4 Replies
DISCRETEHEDGING(1)					      General Commands Manual						DISCRETEHEDGING(1)

NAME
DiscreteHedging - Example of using QuantLib SYNOPSIS
DiscreteHedging DESCRIPTION
DiscreteHedging is an example of using the QuantLib Monte Carlo simulation framework. By simulation, DiscreteHedging computes profit and loss of a discrete interval hedging strategy and compares with the outcome with the results of Derman and Kamal's Goldman Sachs Equity Derivatives Research Note "When You Cannot Hedge Continuously: The Corrections to Black- Scholes". SEE ALSO
The source code DiscreteHedging.cpp, BermudanSwaption(1), Bonds(1), CallableBonds(1), CDS(1), ConvertibleBonds(1), EquityOption(1), Fitted- BondCurve(1), FRA(1), MarketModels(1), Replication(1), Repo(1), SwapValuation(1), the QuantLib documentation and website at http://quantlib.org, http://www.gs.com/qs/doc/when_you_cannot_hedge.pdf AUTHORS
The QuantLib Group (see Authors.txt). This manual page was added by Dirk Eddelbuettel <edd@debian.org>, the Debian GNU/Linux maintainer for QuantLib. QuantLib 20 September 2001 DISCRETEHEDGING(1)
All times are GMT -4. The time now is 08:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy