Sponsored Content
Full Discussion: 20th based convertor
Top Forums Shell Programming and Scripting 20th based convertor Post 302335436 by Dax01 on Sunday 19th of July 2009 09:40:52 PM
Old 07-19-2009
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.

Code:
echo    "                     .: Bienvenido a mi examen completivo:. "  
 
echo"" 
 
echo -n "Cantidad que desea convertir: " 
read op1 
 
until [ $op1 -eq 0 ] 
do 
op2=`echo $op1 / 20 | bc` 
op3=`echo "$op1 - $op2 * 20" | bc` 
op1=$op2 
 
case $op3 in 
10) op3=A 
;; 
11) op3=B 
;; 
12) op3=C 
;; 
13) op3=D 
;; 
14) op3=E 
;; 
15) op3=F 
;; 
16) op3=G 
;; 
17) op3=H 
;; 
18) op3=I 
;; 
19) op3=J 
esac 
 
final=$final$op3 
done 
echo $final


Last edited by Dax01; 07-19-2009 at 12:09 PM.. Reason: did not work
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl to C convertor

Is there one out there that supports Perl/Tk ??? (5 Replies)
Discussion started by: perleo
5 Replies

2. Programming

Binary to Text Convertor

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)
Discussion started by: 01doublehelix10
2 Replies

3. UNIX and Linux Applications

web to wap convertor

cld someone suggest a good web to wap convertor (1 Reply)
Discussion started by: viapillai
1 Replies

4. UNIX for Dummies Questions & Answers

Script ran by job scheduler fails from the 15th to the 20th of the month

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)
Discussion started by: tatchel
2 Replies

5. Shell Programming and Scripting

Searching for bash to cshell convertor

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)
Discussion started by: lio123
5 Replies
platform::shell(n)					       Tcl Bundled Packages						platform::shell(n)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(n)
All times are GMT -4. The time now is 12:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy