![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| converting ip addresses to binary | marchk | IP Networking | 6 | 10-02-2008 08:01 AM |
| Converting source rpm to binary rpm | eamani_sun | Linux | 2 | 05-15-2008 01:10 AM |
| Converting Binary decimal coded values to Ascii Values | gaur.deepti | UNIX for Advanced & Expert Users | 3 | 04-02-2008 09:33 AM |
| decimal to binary function error | return_user | High Level Programming | 8 | 12-21-2007 12:53 PM |
| Converting a decimal into integer | idro | Shell Programming and Scripting | 4 | 10-31-2007 10:51 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
unix script for converting a decimal to binary
Could anybody please help me in writing a script in unix for converting a decimal number to binary number.
|
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Is this homework??
man bc Cheers ZB |
|
#3
|
|||
|
|||
|
I tried 'bc' and 'dc'... but I am not convenient with them.. can you provide the solution...
|
|
#4
|
||||
|
||||
|
Hmm... benefit of the doubt then....
echo "ibase=10;obase=2;128" | bc Where 128 is the number you want to convert. I'll leave it to you to convert this into a versatile script. Cheers ZB |
||||
| Google The UNIX and Linux Forums |