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.
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)
i have the below files in the wrk folder. File names are
i need to change the file name USING pattern and number. output like below :wall:
CCDC0001.R... (3 Replies)
using a shell script to get values from a CSV
Need the format of these numbers to change to
Using nawk on solaris, to parse these values, need the... (10 Replies)
Please can you let me know, how to change file names in a directory that has say 10 files
I have files like
I need a command to change the above files all in one go... (6 Replies)