Confussed as hell


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Confussed as hell
# 1  
Old 07-06-2008
Confussed as hell

Smilie

Last edited by Kevinfine; 07-07-2008 at 08:43 AM..
# 2  
Old 07-06-2008
Code:
#bin/ksh
let max=0
while true
do
    echo "enter a number zero to quit \c"
    read num
    [[ $num -eq 0 ]] && break
    if [[ $num -gt $max ]] ; then
          max=$num
    fi
done
[[ max -gt 0 ]] && echo $max

This requirement sounds like homework - against our rules. If this is, and your teacher sees this, he will know it is plagiarized-- assuming he knows any shell code.

We do not do homework for you here.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

quoting hell - help needed!!

I am writing a bash script to automate the installation of web environment on a base install of Fedora. And I'm at the limit of my last nerve and my bash skills. My brain is screaming at me: "Give up and use perl", but I am trying to stick to bash since the script will modify the perl environment... (6 Replies)
Discussion started by: lbe
6 Replies

2. What is on Your Mind?

The Hell of colaboration in UNIX and Linux

I don't want to speak about the goods or bads of both kinds of Operating systems, I only want to share a little experience with you to comment it. I live in Spain and I have home some old unix systems, some of them that I want to sell or change for other things, like a pair of Sun Blade 2000... (0 Replies)
Discussion started by: Golfonauta
0 Replies

3. Shell Programming and Scripting

hell & mathematics

I've been able to generate output based on the code scarfake provided me (thanks again man). A little background so everyone more or less knows whats going on: I needed code that would propagate a database with 100,000 entries, for capacity testing purposes, something like a stress test. ... (5 Replies)
Discussion started by: ogoy
5 Replies

4. Shell Programming and Scripting

hell and sqlite

Hi everyone, I have a requirement that requires me to fill an sqlite database with 100,000 entries (no duplicates). I will start out by giving the command that will insert the values necessary to populate the database: # sqlite /var/local/database/dblist "insert into list... (2 Replies)
Discussion started by: ogoy
2 Replies

5. What is on Your Mind?

Off-Topic Section? Holy hell, I've been gone a while...

Wowee, step off the bandwagon for a few months and it's amazing what can change. I'm still not sure if this is, in fact, but if it is, what made Neo change his mind about an OT thread? (7 Replies)
Discussion started by: Karma
7 Replies

6. UNIX for Dummies Questions & Answers

rpm hell!

I've just installed redhat 6.2 on one of my systems and am trying to install the gcc c compiler after downloading an rpm from the redhat site. The damn thing gives me: only major numbers <= 3 are supported by this version of RPM what do I do, it does the same with the latest rpm of php ... (7 Replies)
Discussion started by: knmwt15000
7 Replies

7. Programming

fork()ing hell!!

Hello I am having serious trouble with the fork command, i basically want to create 9 or 10 child processes and store their pid numbers in array while the children stay resident until i kill() them later , i cannot seem to control how many are made as they all seem to create their own children. ... (16 Replies)
Discussion started by: theultimatechuf
16 Replies
Login or Register to Ask a Question