10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm having an issue with bash read input when using a case statement.
The script halts and doesn't read the input on the first loop. if I hit enter then the scripts starts to respond as expected. Need some help here.
defaultans=8hrs
read -e -i $defaultans -p "${bldwht}How long would you like... (5 Replies)
Discussion started by: woodson2
5 Replies
2. Shell Programming and Scripting
Hello All,
I am writing a script that is to be placed on multiple servers, and of course I've started
running into some compatibility issues for certain shell commands.
The code below worked just fine on most of my machines except for a couple.
Here I had 4 separate lines in my script that... (3 Replies)
Discussion started by: mrm5102
3 Replies
3. Shell Programming and Scripting
Hey, guys I really need some help with a project.
"Write a shell program that examines the command line arguments, counts and collects the number of options. Basically it has to collect and count the arguments that start with a "-" and the one's that don't start with a -
I know I have to use... (2 Replies)
Discussion started by: sk192010`
2 Replies
4. Shell Programming and Scripting
I have the following bash script and it is not accepting the lines
"--"|"--""-")
"--""-"")
while
do
echo "Current Argument is ${1}"
case "$1" in
"--"|"--""-")
echo "Argument is ${1}"
shift # Skip ahead one to the next argument.
... (1 Reply)
Discussion started by: kristinu
1 Replies
5. Shell Programming and Scripting
Hello,
The standard case statement :-
case "$1" in
"IE0263")
commands;;
"IE0264")
commands;;
esac
is it possible to have :-
case "$1" in
"IE0263" OR "IE0878")
commands;;
"IE0264")
commands;;
esac
Thanks (4 Replies)
Discussion started by: jmahal
4 Replies
6. Shell Programming and Scripting
I'm pretty sure I already know the answer to this, but I want to make sure I'm not overlooking anything. I'm working on a log monitoring script and every 10 lines I want to display a summary of events. The thing is, there are a lot of possible events, that likely won't have happened, so I only want... (0 Replies)
Discussion started by: DeCoTwc
0 Replies
7. Shell Programming and Scripting
greetings,
I have a script that is taking input like this:
a
b
c
d
aa
bb
aaa
bbb
ccc
ddd
and formating it to be like this:
a b c d
aa bb
aaa bbb ccc ddd (4 Replies)
Discussion started by: adambot
4 Replies
8. Shell Programming and Scripting
Hi,
I'm trying to write a routine to parse a file that contains data that will be read
into arrays. The file is composed of labels to identify data types and arbitrary
lines of data with the usual remarks and empty new lines as is common with
config files.
The initial pass is built as so:... (3 Replies)
Discussion started by: ASGR
3 Replies
9. Shell Programming and Scripting
Hi,
I am writing case statement to execute some finction, my requirement is once one of the case statement is executed again it has to prompt for the option.
for script in `echo "$Script_Selected"`
do
case $script in
1) getNoOFActUsers
;;
2) moveServerrOORotation
;;
... (2 Replies)
Discussion started by: Satyak
2 Replies
10. Shell Programming and Scripting
Hi all,
is it possible to create a 'dynamic' case statement.
ie
select option in `ls`
do
case satement depending on results of the above `ls`
done
I hope I have explained this ok!
Thanks
Helen (1 Reply)
Discussion started by: Bab00shka
1 Replies