07-26-2009
Script is below
choice=0
while [ $choice -ne 10 ]
do
clear
echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo""
echo " #"
echo " # #"
echo " # CCcam Menu #"
echo " # #"
echo " # #"
echo " # 1) Install CCcam #"
echo " # #"
echo " # 2) Remove CCcam #"
echo " # #"
echo " # 3) Backup CCcam #"
echo " # #"
echo " # 4) Mail CCcam.CFG #"
echo " # #"
echo " # 5) Stop CCcam #"
echo " # #"
echo " # 6) Start CCcam #"
echo " # #"
echo " # 7) Restart CCcam #"
echo " # #"
echo " # 8) Setup CCcam monitoring #"
echo " # #"
echo " # 9) Go BACK == >> #"
echo " # #"
echo " # 10) Exit #"
echo " ############################################### "
echo ""
echo -n " choice: "
read choice
case "$choice" in
1) df;;
2) ./script2;;
7) ./ CCcam_restart.sh;;
esac
i on my 7) choice, the script will restart Application CCcam but if it finished with success being the it restarted correctly , it should echo " Cccam restart successfully " to screen.
Hope this will help..
Many Thanks
Wmccull
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
when the file is not found i want it to return to the menu, however it carries out the next line when i hit a key
I know its probably something simple can anyone help?
here is my pause function:
function pause(){
read -s -n 1 -p "Press any key to return to Menu . . ."
echo
}
SCRIPT... (2 Replies)
Discussion started by: Alendrin
2 Replies
2. AIX
I would like to hear your opinions, comments, pros and cons about the IVE (Integrated virtual ethernet) and VIOS (virtual i/o server)
With the VIOS can create virtual ethernet and virtual disk
With the IVE I dont need to create the vios and I can have virtual ethernet (physical and logical... (3 Replies)
Discussion started by: lo-lp-kl
3 Replies
3. Ubuntu
I posted this at another forum 25 minutes ago and it has only been looked at once. I have much more faith in this forum, as I've had some good help in the shell scripting forum.
So I'll just repost this here. I don't know if this is an (K)Ubuntu specific problem, but that is what I use. Problem... (0 Replies)
Discussion started by: notsomeone
0 Replies
4. Shell Programming and Scripting
Hi there, I am new to Unix and at the moment
I am trying to solve my assignment that is to create a script for the program
to prompt user to type three codes,
from user point of view it should be done by
typing codes separating them by spaces.
Then program displays a menu with these three... (2 Replies)
Discussion started by: Dannel
2 Replies
5. UNIX for Dummies Questions & Answers
Hi there, I am new to Unix and at the moment
I am trying to solve my assignment that is to create a script for the program
to prompt user to type three codes,
from user point of view it should be done by
typing codes separating them by spaces.
Then program displays a menu with these three... (5 Replies)
Discussion started by: Dannel
5 Replies
6. UNIX for Dummies Questions & Answers
Im new to unix/linux and am having trouble with this one.
My problem is when i enter 9 to exit it doesnt do so.
also option 6 doesent display the time. Its getting to be frustrating.
I know there are probably alot of bug in this bu these basic ones are really odd.
#!bin/bash
#
until ... (3 Replies)
Discussion started by: christ.666
3 Replies
7. Shell Programming and Scripting
I have tried searching the forum but i haven't found a solution for this.
I have a shell script that presents the users with menus. The menus branch out to sub menus. It is all hunky dory as long as i traverse forward. But if i am in a sub menu and return to the previous menu and choose any... (11 Replies)
Discussion started by: goddevil
11 Replies
8. AIX
Hi,
is the IVE not included by default in the latest Power7 models?
When did it disappear?
Can it be ordered as an add-on?
Thanks for answering, ff (0 Replies)
Discussion started by: firefox111
0 Replies
9. Shell Programming and Scripting
HI All..
below is my menu options script. in option 2,3 and 4 im giving input and they are saving into their respective text file.
problem is when im trying to "cat" those files in options 7,8 and 9 im not getting the output. no respective file contents are displaying on screen. but if i... (1 Reply)
Discussion started by: saichand1985
1 Replies
10. Linux
Everything in the following script works fine, except the jobs command. It works when the script is not running, but does not work in the script itself and I cannot figure out why. Any help would be greatly appreciated.
using bash shell
clear
while
echo " A: Jobs"
echo " B: PS"
echo " C:... (2 Replies)
Discussion started by: silencep77
2 Replies
LEARN ABOUT PHP
mssql_fetch_field
MSSQL_FETCH_FIELD(3) MSSQL_FETCH_FIELD(3)
mssql_fetch_field - Get field information
SYNOPSIS
object mssql_fetch_field (resource $result, [int $field_offset = -1])
DESCRIPTION
mssql_fetch_field(3) can be used in order to obtain information about fields in a certain query result.
PARAMETERS
o $result
- The result resource that is being evaluated. This result comes from a call to mssql_query(3).
o $field_offset
- The numerical field offset. If the field offset is not specified, the next field that was not yet retrieved by this function is
retrieved. The $field_offset starts at 0.
RETURN VALUES
Returns an object containing field information.
The properties of the object are:
o name - column name. if the column is a result of a function, this property is set to computed#N, where #N is a serial number.
o column_source - the table from which the column was taken
o max_length - maximum length of the column
o numeric - 1 if the column is numeric
o type - the column type.
EXAMPLES
Example #1
mssql_fetch_field(3) example
<?php
// Connect to MSSQL and select the database
mssql_connect('MANGOSQLEXPRESS', 'sa', 'phpfi');
mssql_select_db('php');
// Send a select query to MSSQL
$query = mssql_query('SELECT * FROM [php].[dbo].[persons]');
// Construct table
echo '<h3>Table structure for 'persons'</h3>';
echo '<table border="1">';
// Table header
echo '<thead>';
echo '<tr>';
echo '<td>Field name</td>';
echo '<td>Data type</td>';
echo '<td>Max length</td>';
echo '</tr>';
echo '</thead>';
// Dump all fields
echo '<tbody>';
for ($i = 0; $i < mssql_num_fields($query); ++$i) {
// Fetch the field information
$field = mssql_fetch_field($query, $i);
// Print the row
echo '<tr>';
echo '<td>' . $field->name . '</td>';
echo '<td>' . strtoupper($field->type) . '</td>';
echo '<td>' . $field->max_length . '</td>';
echo '</tr>';
}
echo '</tbody>';
echo '</table>';
// Free the query result
mssql_free_result($query);
?>
SEE ALSO
mssql_field_seek(3).
PHP Documentation Group MSSQL_FETCH_FIELD(3)