Here is what I have working thanks to all of you. Now I need to take it one step further. The $result value needs to be in the $0000.00 format instead of what it is now, 000000. Yes, it is always 6 characters, I thought this would help but so far it has baffled me.
My thought was to pull the right two numbers into one variable and left 4 numbers into another, then concat them with a dollar sign in front. But I cannot get it to work right.
This is what I have that works right now:
Last edited by Franklin52; 08-01-2011 at 11:02 AM..
Reason: Please use code tags for data and code samples, thank you
Thanks for the printf, never used it before. The result is not what I need and I am guessing I just can't get it to format out as I want. the number is 23240 for example and it is printing out on the screen as 23240.00 instead of $232.40
---------- Post updated at 09:58 AM ---------- Previous update was at 09:41 AM ----------
I have always been hesitant to use the sed command, it has been a while since I was in a UNIX shop, been in windows for the last 8 years and now back in UNIX.
Hi,
I am writing an awk script and I have got stuck. I am trying to find a word that has 2 dollar signs in it but its failing. I have already tried to escape it with single and double back slash and also I have tried to use \044 in the search but even that doesnt work. can you please help me... (7 Replies)
I have a file which looks like this
01081023442 220000000410629994812279000001099952504280000000000000000000000000010050000000000 0000000000 0000000000 1101211221099952504280000010704525042800120000000000000000000000000000000000001 0000000000000006000000000000815500000010000010000000000000... (2 Replies)
Hi,
i have the below files in the wrk folder. File names are
AAB0001.R
BBA0002.R
CCDC0003.R
AAB0002.R
AAB0034.R
BBA0081.R
DDDE0008.R
i need to change the file name USING pattern and number. output like below :wall:
AAB0001.R
AAB0002.R
AAB0003.R
BBA0001.R
BBA0002.R
CCDC0001.R... (3 Replies)
Hi,
using a shell script to get values from a CSV
eg:
12345.67,5678990.89,76232882.90
12345,5678990.89,76232882
Need the format of these numbers to change to
12,345.67:5,678,990.89:76,232,882.90
12,345:5678990.89:76232882
Using nawk on solaris, to parse these values, need the... (10 Replies)
Hello,
I have a file which contains some line as follows,
9.9 TEMP
9.9 MUCOEFF
0.0 EPSILON
And I want to increase this MUCOEFF by 0.2 as
9.9 TEMP
10.1 MUCOEFF
0.0 ... (7 Replies)
Hi Guys,
Please can you let me know, how to change file names in a directory that has say 10 files
I have files like
STR1.rman.pre.script
STR1.rman.post.script
STR1.rman.inc.script
STR1.rman.cold.script
STR1.rman.hot.script
I need a command to change the above files all in one go... (6 Replies)