Search Results

Search: Posts Made By: scott78
4,109
Posted By scott78
Thank you all, once again. oombera, I...
Thank you all, once again.

oombera, I understand your code the best because it's a little more simple for me to read and understand, but none of the error messages triggered when I tried it out.
...
4,109
Posted By scott78
what the script is supposed to do is that I want...
what the script is supposed to do is that I want it to accept an integer and do the following:
1. If it's positive and greater than zero, count down to one
2. If no argument is entered at the...
4,109
Posted By scott78
not reading the negative argument
I have one more question about the following lines of code:

#!/bin/ksh

if [ "$1" ]; then
num=$1
while [ $num -gt 0 ]; do
echo $num
((num=num-1))
done
elif [ "$1" ]; then
...
4,109
Posted By scott78
Thank you both so very much!! Works like it's...
Thank you both so very much!! Works like it's supposed to and how I imagined it would!:)
4,109
Posted By scott78
My command line: /Practice>Countdown 8 Output: ...
My command line: /Practice>Countdown 8
Output: 8
Countdown[6]: $num: unknown test operator

this is what it says when executed
4,109
Posted By scott78
Yes, $1 is supposed to be a positive number. I...
Yes, $1 is supposed to be a positive number. I inserted your code that you gave me but it gives me an error about not having a command argument. I tested it with Countdown 8, it would print out the...
4,109
Posted By scott78
code placement
I'm sorry if something like this has already been posted, but I didn't find anything like it.

I'm using ksh The code that I've come up with will initially print what I want, but will then keep...
5,800
Posted By scott78
Accepting User Input
I'm just starting out with UNIX and have figured some stuff out. I just need some help with accepting user input on the command line. For instance, I created a number counter that counts down from...
Showing results 1 to 8 of 8

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