Hi,
Sorry for not explaining properly.
But I am done the verification part.
Here is my verifcation part, All want to do is, get this output.
Output part:
Each time your output is referring to Canadian or US Dollars, the dollar number must be preceded by a $ sign, such as $1540 Canadian, or $164.55 US. (The word Dollar should not appear).
The resultant currency displayed and the currency exchange rate should always be rounded off to 2 decimal places.
The output of the script should be formatted so that the name of the country in the 1st 2 lines, always starts at the 1st character on the screen, the decimal point of the currency exchange rates should always be the 35th character, and the currency unit always starts at character 41.
Example 2:
-> as per this example i have to get the decimal point on 35th char, and "D" of Dollar on 41st char.
$ exchange.bash CAD 50 Irr Canadian: 1.00 Dollar Iranian: 10230.19 Rial -> For this line, I need to get "s" after Dollar or Rial if its more than 1. $50 Canadian is equivalent to 511509.50 Iranian Rials.
If the original or resulting amount is more than 1 then you must display the currency name with an "s" at the end, e.g. Rials versus Rial.
The resulting output line must be in the format and text as per examples provided.
-> to get this kind of example i have done this,
->the echo line is checking if the decimal point is on 35th char and the "D" of Dollar on 41st char on both line generated by 1st two awk line.
but its not correct it doesnt work properly.
->this awk fetches data from the file and does the math, hope you get what i want to say.
---------- Post updated at 10:43 PM ---------- Previous update was at 01:08 PM ----------
THis thread is closed now.
THank you for ur help.
Last edited by newbee006; 12-05-2010 at 02:26 PM..