Your problem is that when you reach the desired count, the while loop exits. You need to wrap your while inside of an outer while and move your prompt outside of your inner loop.
Along the lines of:
This logic is a bit flawed inasmuch as it will prompt if count is reached and is a multiple of 10, but it should give you an idea.
Hello,
I am having a problem setting a range of numbers for the "case" structure.
I can use with no problems, but
when I use it doesn't work???
Does the case struture allow numeric ranges?
eg:
echo -e "enter number between 0 and 60: \c"
read $answer
case $answer in
) echo... (2 Replies)
I'm trying to run a ksh script with a case condition to handle parameters.
#!/bin/ksh
db_start(){
*code
}
db_shut(){
*code
}
case "$1" in
up)
db_start TRNG
;;
down)
db_shut TRNG
;;
*)
echo "Usage: $0 { up | down }" (3 Replies)
I need to display this menu and accept variables. Can someone tell me why i am having a problem with this case statement, please
# TAPE MANAGER MAIN MENU
tapemgr_Main_Menu()
{
echo "Legato Tape Management System Menu"
echo " This system is used to report Legato ERV Offsite and Tapes... (6 Replies)
I am using ksh on a HP Ux. I have a simple script but am having problem with the case statement:-
#!/usr/bin/sh
Chl=”SM.APPLE_SWIFT_DV”
LoConfirm=””
case $chl in
)
LoConfirm=”Using channel at Building 1”
echo “test conditon1”
echo $LoConfirm;;
)
LoConfirm=”Using... (2 Replies)
Hi there,
Im having some problems with this function, I pass two arguments to the function $1 $2 (Arguments are month and date inputted by the user)
for some reason the case always fails... however in the cases defined below where it shouldnt fail the result is:
if it fails with input... (6 Replies)
Hi,
I need modify the all lines in a file into one format.
cat file
htec.twe34c.ATI
.hesh.twdghu..ATI
..hesh.twdghu..ATI
htec.twe3
hjsct14567ati
Output should have 16 characters
htectwe34c ATI
heshtwdghu ATI
heshtwdghu ATI
htectwe3 ATI
hjsct14567 ATI (4 Replies)
Guys,
Here is the script syntax which is not accepting the parameters & not performing the said activity.
$ ./routing.sh xyz123-ra str enable
**********************************************************************
Preparing to service the request for Device xyz123-ra in Question... (9 Replies)
Hi,
When I execute the below script, I am getting the error as
' is not expected.ror at line 3 : `in
#!/bin/sh
case $1 in
-r) echo Force deletion without confirmation ;;
-i) echo Confirm before deleting ;;
*) echo Unknown argument ;;
esac
I could not see any problem with... (1 Reply)
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)
hi guys....in my code the echo statements inside case statements are not printing the required display info....pls help me out
#!/bin/bash
tput clear
tput cup 3 15
tput setaf 3
echo "BACKUP PROJECT"
tput sgr0
tput cup 5 17
tput rev
echo "select option"
tput sgr0
tput cup 7 15
echo... (12 Replies)
Discussion started by: diw10
12 Replies
LEARN ABOUT DEBIAN
dahdi_test
dahdi_test(8) System Manager's Manual dahdi_test(8)NAME
dahdi_test -- Test if the DAHDI timer provides timely response
SYNOPSIS
dahdi_test [ -v ]
DESCRIPTION
dahdi_test dahdi_test runs a timing test in a loop and prints the result of each loop. The test is as follows:
It reads 8192 bytes from the DAHDI timer device (/dev/dahdi/pseudo). This should take exactly 8000 ms . It uses calls to gettimeofday(2)
before and after that read to check that indeed exactly 8000ms have passed.
Values of 100% and 99.99% Are normally considered a definite pass. Values of 99.98% and 99.97% are probably OK as well.
OPTIONS -v
Be more verbose: print one line per test.
-c count
Run for count times instead of running forever.
FILES
/dev/dahdi/pseudo
The device file used to access the DAHDI timer.
SEE ALSO dahdi_tool(8), dahdi_cfg(8), asterisk(8). gettimeofday(2)AUTHOR
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com> Permission is granted to copy, distribute and/or modify this docu-
ment under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.
2005-06-25 dahdi_test(8)