Search Results

Search: Posts Made By: unknownsolo
3,578
Posted By unknownsolo
Worked like a charm :D you are da man my friend!
Worked like a charm :D you are da man my friend!
3,578
Posted By unknownsolo
I did it like this: #!/usr/local/bin/bash ...
I did it like this:

#!/usr/local/bin/bash

MAX=0
for ((i=1;i<=$#;i++))
do
a=${!i}
if [ $a -gt $MAX ] ; then
MAX=$a
fi
done
echo "The highest number is: $MAX"

Still...
3,578
Posted By unknownsolo
Can you elaborate a little better!
Can you elaborate a little better!
3,578
Posted By unknownsolo
Thans vgersh99 for the quick reply,...
Thans vgersh99 for the quick reply, unfortunately, i tried your code and get an error


max.sh: 3: typeset not found
max.sh: 4 Syntax error: Bad for loop variable
3,578
Posted By unknownsolo
Find highest number - working but need help!
Hello all, I am new to this and need some help or maybe steer me to the right direction!

I wrote a script to get the highest number and prints it on the screen, the script basically asks the user...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 02:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy