Hi, I'm new at Linux shell programming so I could use some help. I need to make a 20thdecimal convertor. Is just like hexadecimal, the only difference is that hexadecimal goes from 1-9 and A-F, and I need this one to go from 1-9 and A-J.
I got some already but I get endless loop, please take a look.
At this point I get the two number that I need, then I just add some labels to let it know that A= 11, B= 12, etc. The thing is I cannot stop the loopAny ideas aprecciated.
I used this Hexadecimal convertor as started and just changed the base from 16 (hexadecimal) to 20 (the one I desire) on lines 6,7.
Last edited by DukeNuke2; 07-18-2009 at 04:19 AM..
Reason: added code tags
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
the weekend isn't the best time for your question... this is mostly a very professional board and our members are online during workdays. i guess the weekend is for other stuff . so please be patient and don't bump up your posts because this is against the rules also!
Sorry again for the bump. Matrix I didn't quite get your question, could you explain it a little better please? And murphy I'm gonna try your idea now, but could you explain me the function of the commands? Cause my teacher might ask what the shell I did and if I don't know I'm done for.
(Note that when I said "what the shell I did" I really meant "what the h*ll I did", just a senseless Linux users joke. I'm not sure if you can say that word, want not brake the rules again)
EDIT:This ksh93 you talk about, do I have to download it and install it? Cause I'm out of home now and I'm using my ubuntu cd as live. :S
EDIT2: Just read the rules and found out this is no place for homework post neither...my grave is digged.
---------- Post updated at 05:37 PM ---------- Previous update was at 07:59 AM ----------
For the love of God, won't anyone help me? I could be a great open source programmer on day but I gotta get this step done first. My time is running out, 5 hours left...and I just need to get pass that loop!
---------- Post updated at 08:40 PM ---------- Previous update was at 05:37 PM ----------
Here guys, I finished, just 3 hours left lol. Thanks for your help Murphy and Matrix. Won't flame people who didn't help me cause its against the rules (hard to resist). Enjoy trying it, its kinda fun. I'll tell my friends I beated Unix forums.
Last edited by Dax01; 07-19-2009 at 12:09 PM..
Reason: did not work
Hi ,I have seen this comverters before ,but I was searching today and I can not find them .Is anybody used them before .Any recomendations
Thanks (5 Replies)
Hi,
I have a script that finds the application logs from the previous day and sends it to another server via ftp.
The code is something like this:
yest_date=`TZ=CST+24 date "+%b %d"`
logdir=/app/logs
logs=app*.log
tmpdir=/tmp
cd $logdir
for i in `ls -1 $logs`
do
chkstr=`ls -1l $i | grep... (2 Replies)
Hey Im starting out in C just recently and Im needing a string that converts binary to text, The only way i know of doing this without knowledge of C entirely. Is Making a sorta of library of the entire alphabet in binary for the program to select the text from it to display a sentence. If that... (2 Replies)