View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 17 posts ] 
Go to page Previous  1, 2

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Mon Sep 18, 2006 4:55 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Try something like:
Code:
#!/bin/bash

DIGITS=$(echo $1 | awk '{ printf("%03d\n", $1); }' | sed -e 's/./& /g')
for digit in $DIGITS; do
    echo $digit
done

My example just produced a string on stdout, you need to capture the reformatted number and use it rather than the original...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 19, 2006 7:47 am 
Offline
Joined: Fri Jul 29, 2005 1:22 am
Posts: 232
Location: SF East Bay, CA
tjc wrote:
.. you need to capture the reformatted number and use it rather than the original..

That does it! Thanks! :)

_________________
// Brian - Hardware:
ASUS P5P800 - P4 3Ghz, 500 GB PATA HD
ASUS P5K-V - P4 Core2 Duo, 500 GB SATA HD
Hauppauge PVR-350, IR Blaster, Comcast Digital Cable
http://tech.groups.yahoo.com/group/KnoppMyth/
KnoppMyth R5F27 >> R5.5


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 
Go to page Previous  1, 2



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu