10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all
i am trying to get help with writing a script using case statement to display menu as
1) Authentication log
2) System log
3) Messages
4) Dmesg
5) Boot log
Q) Exit
When selecting the menu by 1 or 2 or 3 o 4 or 5, it should display the last 10 lines of the log files,
if... (3 Replies)
Discussion started by: renegade11
3 Replies
2. Homework & Coursework Questions
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:
Write a shell menu program that will:
a. copy a file to a designated directory
b. tell you if a specified user... (13 Replies)
Discussion started by: Jagst3r21
13 Replies
3. Shell Programming and Scripting
I am trying to make a calculator. The user Enters number 1, chooses and operation, enters number 2, then chooses another operation or for the answer to be displayed.
eg. 1 + 1 = or 1 + 1 + 2 + 1 =
Both of these should be possible.
#!/bin/bash
read -p "what's the first number? " n1... (3 Replies)
Discussion started by: redshine6
3 Replies
4. UNIX for Dummies Questions & Answers
Dear Sir,
May I know how do I go about adding the following feature into the script below:
When user enter values other than 1,2,3,4,
a) Message “Wrong entry !!! Pls select 1,2,3 or 4” is displayed
b) The screen is cleared again and the menu is displayed.
#!/bin/bash
clear
var=1... (2 Replies)
Discussion started by: fusetrips
2 Replies
5. Shell Programming and Scripting
EDIT : System used : Any Linux distribution.
Hello everyone,
I m having quite a headache trying to figure out why I m having a 2 columns output in the following code :
#!/bin/ksh
menu_rotation()
{
#Variables
CHOIX1="Rotation 1"
CHOIX2="Rotation 2"
CHOIX3="Rotation 3"
... (11 Replies)
Discussion started by: Sekullos
11 Replies
6. Shell Programming and Scripting
Hopefully I'm in the right place. Im new to the forums and linux!
I'm looking to add a menu to my perl hangman game i have created. The menu will use user input for the desired option and then perform the operation indicated. I would like something along the lines of:
Welcome to Hangman... (1 Reply)
Discussion started by: jahburmski
1 Replies
7. 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
8. 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
9. Shell Programming and Scripting
I am very new to Unix and don't know much about it. I've been trying to create a menu and what I don't understand is how to execute a command once a user makes a selection. I have the menu set up. In fact, the following is the code that I have thus far:
#! /bin/csh
# This is the UNIX menu... (0 Replies)
Discussion started by: sinjin
0 Replies
10. Shell Programming and Scripting
Hi,
I'm writting a script to filter a cvs log and get only the modified files to move them to a specific directory to compile.
I try to filter a line and move from source to target, with no results. Could you help me?
for example, in the cvs log file appears:
cat log.txt
U... (2 Replies)
Discussion started by: Manu
2 Replies