I feel like what I need to do, would be best accomplished with a loop.
However I dont have the slightest idea how to set that up.
The script is part of a interactive shell, for making settings to a Mac OS X server.
This particular part is in regards to disabling files services.
I want the user to have to ability to choose all of the choices if thats what they want to do.
The easy way out is just to use the two functions the total number of options available. But if they dont need to disable all the options, then i dont want to force them to go thru more then they have too.
Hopefully that makes since?
And if its not obvious, must of that code I borrowed.
I want the user to have to ability to choose all of the choices if thats what they want to do.
If you mean to say that the user must be able to either select an option of his choice or ALL the options.. then you ll need to explicitly show him the option - ALL.
Please let me know if I got you right. Then we may think further.
This will loop and ask for actions until it receives the code (a 9) to stop. There are not any commands to be run, but that could be handled with if or case statements. (You were asking about loops.)
If you mean to say that the user must be able to either select an option of his choice or ALL the options.. then you ll need to explicitly show him the option - ALL.
Thats kinda of right. But i need to to have the ability to pick and choose.
The all choice is good, but I need the user to have the ability to also be able to pick more then just one. And it could be any combination of the options.
Functionally, I guess it would work if it kept asking the user until they chose to quit the command.
Why wont my for statements work? Im trying to get this script to swich to a user an if you put in a start/stop/or restart paramater to do just that for each user. I commented out the actual start/stop actions to test it just by using echos and not do anything hasty in the environment but it... (0 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
In this script you will take a directory as input from the user and change the end of line sequence from a Unix... (1 Reply)
Hi, I am starting to enhance my scripting knowledge and need some assistance with simple 1 line for loops. This may help to do a mass permissions change on a big apache doc root while I have an insane customer on my phone.
What is the best resource to learn this skill and what are some that... (5 Replies)
Hello,
I'm not sure if this is more appropriate for the 'unix for dummies' or the 'unix for experts' forum because I'm new to this forum and this is the second topic I've discussed, but if you could let me know which one was more appropriate for something like this, please do!
So in tr (an... (2 Replies)
Hi everyone,
I have a question regarding for loops. I am writing a BASH shell script that will contain multiple loops. These loops all involve looping with a count:
for (( a=0; a <=10; a++ )); do
echo $a
done
If none of my multiple loops relate to each other throughout the script,... (3 Replies)
#!/bin/bash
IFS=$'\n'
A= a c b t g j i e d
B= t y u i o p
counter=0
found=""
for i in $(cat $A)
do
for j in $(cat $B)
do
if
then
found="yes"
fi
done
if
then (1 Reply)
I'm trying to create a loop that will prompt the user for 15 values, not forcing them to enter all 15. If the user enters through one or more of the prompts the null value needs to be converted to 0, otherwise set the parameter = to the value entered:
ex.
Please enter file no #1: 17920
... (4 Replies)
Hello Guys
I need some help with my script
I'm not very good at this, hope you can point me in the right direction.
My idea, to write a file with some router commands and use it on a script for me to run on a demand basis, ( or added to the cron, if I get it to work).
The below script works,... (5 Replies)
ok, i tried to write a script called purge.sh
which searches current process' for a specified user running a process with a specified keyword. it also prompts the user to see how many times to purge for the specified process and how many different processes they wish to do this to.it worked until... (11 Replies)