vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   Could someone, anyone helpme troubleshoot this basic shell script? (https://vborg.vbsupport.ru/showthread.php?t=80716)

pixelpunk 04-28-2005 09:04 PM

Could someone, anyone helpme troubleshoot this basic shell script?
 
Code:

#
# Brad Wright
# Menu Script
# ITEC 2201 Lab 4
#

while true
do

# Clears screen and displays menu
clear
echo '

MAIN MENU
---------
1) Calculator
2) Vi
3) E-Mail
4) Log Off

Please enter your selection. (1-4):'

# Launches application based on user input

read number
        case number in
        1) cal;;
        2) vim;;
        3) mail;;
        4) logout;;
        *)  echo "Invalid option..."
                echo "Please re-enter your selection. (1-4)"
        esac
done

It's not runing the selected apps and instead just returns to the menu... ?

Zachery 04-28-2005 09:21 PM

Quote:

Originally Posted by pixelpunk
Code:

#
# Brad Wright
# Menu Script
# ITEC 2201 Lab 4
#

while true
do

# Clears screen and displays menu
clear
echo '

MAIN MENU
---------
1) Calculator
2) Vi
3) E-Mail
4) Log Off

Please enter your selection. (1-4):'

# Launches application based on user input

read number
        case number in
        1) cal;;
        2) vim;;
        3) mail;;
        4) logout;;
        *)  echo "Invalid option..."
                echo "Please re-enter your selection. (1-4)"
        esac
done

It's not runing the selected apps and instead just returns to the menu... ?

I am guessing this is either a windows shell script or a linux one :p leaning towards linux

try refrencing the real path?

/usr/bin/vim

? :D

Marco van Herwaarden 04-29-2005 03:57 AM

Try changing:
Code:

        1) cal;;
into
Code:

        1) cal
read foo?"Press enter to continue"
;;

Like that you will at least see if there is an error.


All times are GMT. The time now is 10:57 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01074 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete