Ubuntu :: Returning To A Menu In Bash Script?

Feb 7, 2011

Im constructing a menu for a program using case. I have all my normal input options mapped out but i want to have a * ) option so that if something else is inputed, it displays "Incorrect input" and then resumes the normal menu function. How do I do this? Ideally, I'd like it to display "Incorrect Input" and then accept more input for the menu.

View 2 Replies


ADVERTISEMENT

Ubuntu :: Matching And Returning A Part Of File Name On Bash?

Apr 25, 2011

If I have files named like this:

abc_one.c
egx_two.c
tsf_two.c

[code]...

View 9 Replies View Related

General :: Bash Catching The Function Returning Value Into A Variable?

Mar 17, 2010

i am dealing with this problemI have a function

function Une {
...
return $some_variable

[code]...

View 6 Replies View Related

Programming :: Simple Bash Script Not Returning Correct Value?

Sep 14, 2010

I have a very simple bash script:echo -n Create home directory?:

read HOMEDIR
if [ $homedir="y" ] || [ $homedir="yes" ]; then
homeval=" --makehomedir"

[code]...

View 6 Replies View Related

Ubuntu :: Bash Script Won't Run From Menu?

Apr 13, 2011

Wrote a bash script that works fine when run in a terminal... Tried to make a shortcut from the application menu to it, but when I run it from there, I get "There was an error creating the child process for this terminal."

View 2 Replies View Related

Ubuntu :: Bash Menu Option Loop

Mar 19, 2010

I am trying to make a bash menu that loops with options but it does not work as I want:

Code:

I want to make it read an option and do the action then return to menu.

View 2 Replies View Related

General :: Bash Shell Script With Menu?

Apr 12, 2011

I've written a bash shell script (code provided below) that gives the user 4 options. However I'm having a little trouble with the code. Right now when they select option 3, to show the date.It loops over and over again.I have to close the terminal window to stop it because it's an infinite loop. How would I prevent this? Also quit doesn't seem to be working either.

#!/bin/bashe
echo -n "Name please? "
read name
echo "Menu for $name[code]............

View 2 Replies View Related

Programming :: BASH: Dialog Menu With Descriptions?

May 5, 2010

I am envisioning a dialog menu with 2 sections, the top 2/3 a menu, then the bottom 1/3 is a message box. When you highlight a menu item it gives you a description of what it does in the message box. However I am not sure it is possible. Can this be done in BASH?

View 2 Replies View Related

Programming :: Bash Scripting: Menu From File?

May 29, 2011

I have a file called list.txt with on word on each line that changes in length. I'd like to make a menu, each line being its own choice. I pieced together most of it the only thing missing is a failsafe for typing a number out of range

Code:
#!/bin/bash
p=`cat list.txt | awk '{print$1}'`

[code]....

View 2 Replies View Related

Programming :: How To Create A Menu In C Like Bash's Select

May 23, 2011

Im wondering how to create a menu in c like bash's select. I imagine there is already something out but I don't know what it would be. Im a c newb but been scripting for a long time now and trying to pick up a little c.this would be what I am looking to display:

Code:

1) option 1
2) option 2
3) option 3

Make a selection:obviously 1,2,3 would be the only valid selection and anything else would say invalid or something like that.

View 2 Replies View Related

General :: Bash Script Choice Menu From Csv File?

Jan 25, 2011

The script starts first a program I wrote earlier that collects specific data from 3 online csv files and write a summary csv file called /Tribalwars/request.csv . The seperator used is ;

the csv file looks like this but can be any number of rows (but not to many mostly 3 - 5)

Title1;tile2;...;title15;
B1;B2;...;B15
C1;C2;...;C15
D1;D2;...;D15

Now the next part of the script, and that is what I want to change, asks me to manually input some data I have to copy paste from the csv file just created. I mean if i choose to continue to do my calculations for city 2, I need to copy-paste C1 for the first variable 'cityname' , copy-paste c2 for the second variable 'xxx',copy-paste C3 for the third variable 'yyy',copy-paste C15 for the fourth variable 'points'

Then it starts new calculations etc, witch only these variables.

Now could it be possible to make a menu from the csv file with only the according cells on the screen and that I only have to choose a row from the menu?

View 5 Replies View Related

Ubuntu :: Executing Bash Script As Root In Terminal Via Shortcut In Main Menu?

Jul 31, 2011

I wrote bash script that uses zenity and a choice to install various programs, tested it and it works, but only when I call it from terminal. I wanted to add it in gnome main menu. The script is /home/eee/zenity.sh. In accessories I added an entry with command:

Code:
/home/eee/zenity.sh
, but since there is no terminal it starts zenity, but it does not work. I have also tried
Code:
gksu gnome-terminal -x /home/eee/zenity.sh

[Code].....

View 4 Replies View Related

Programming :: Creating A Text Based Menu Structure In Bash?

May 15, 2009

Is it possible to create a text based menu layout in bash were it is possible to browse through. The menu list should look something like this:

----------------------------------------
user: root
colour: blue
number: 4
animal: dog
----------------------------------------

At the start the cursor should blink at the r from root so that text can be entered. When pressing the enter the cursor should go to the b from blue and so on. the imported thing is that all the text is visible also beyond the position from the cursor.

View 4 Replies View Related

Programming :: Create A Bash Menu Script For Home Server - Restore Files From A Backup?

Jan 19, 2011

I would like to create a bash menu script for my home server For instance if i were to type ./script It would then bring up 3 options

a. Create a backup
b. Restore files from a backup
c. Quit

If you were to select a or b it should then ask you were you want to backup or restore from. And if i were to type in an incorrect letter i should get an error and take me back to menu. I have attepmted this a view time now and have magaged to get the menu up using parameters

View 9 Replies View Related

Ubuntu :: Gdb Not Returning To Prompt

Jun 6, 2010

i'm trying to make a backtrace of nautilus (as described here: URL...to fill a bug report but it doesn't work.after i "attach PID" to the nautilus-process and do "continue" it's not possible with ctrl-c to return to the (gdb)-prompt. the wiki-page above says:"If the program hangs but doesn't crash you can press ctrl+c in gdb while the program is frozen and then continue with the next step".

View 1 Replies View Related

Ubuntu :: Sleeps Again After Returning From Sleep

Feb 2, 2010

I configured Dell Latitude D620 to go to sleep mode (suspend to ram) when i close the lid. It suspends ok and then I open the lid. It wakes up ok, but few seconds after goes to sleep again! So I need to press the power button to force it to wake up.

Sleep button works just fine. /etc/acpi/sleep.sh from console too.

/etc/acpi/events/lidbtn

Code:
event=button[ /]lid
action=/etc/acpi/sleep.sh
update:

I noticed that it always goes to sleep again when I wake up laptop by opening the lid. For example if I run /etc/acpi/sleep.sh, pm-suspend or press the sleep button laptop goes to sleep, then i close the lid and when i open it back - the problem occurs.

View 4 Replies View Related

Ubuntu :: Wikipedia Won't Load - It Keeps Returning Code 200

Jan 26, 2010

Wikipedia won't load! It keeps returning code 200 (ok) along with 0 bytes of source...

View 2 Replies View Related

Ubuntu :: Locate Not Returning Any Results / Force It To Do?

Feb 6, 2010

Bit of a strange one - locate is not finding any files ??
I'm running xubuntu karmic and 'locate' is actually 'mlocate' so doesn't allow the -u switch.

Is there some way of forcing it to reindex?

View 2 Replies View Related

Ubuntu :: Screensaver Returning Error Message With GLX

Feb 14, 2010

I don't know what I'm missing or what I did to break it, but most screensavers that I have end up returning this error message:
"X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 135 (GLX)
Minor opcode of failed request: 19 (X_GLXQueryServerString)
Serial number of failed request: 16
Current serial number in output stream: 16"
This is also the output of glxinfo. Did I somehow break something in my graphics driver?

View 4 Replies View Related

Ubuntu :: Lucid Always Asks For Password When Returning From Idle?

May 1, 2010

I do like a lot of the changes they've made in Lucid (especially the aesthetic ones), but there is one change they made that I don't like, and I can't figure out how to get around it. I have Ubuntu set so that, after 10 minutes or so of inactivity, my screen is blanked, in order to save power. In Lucid, though, whenever I come back to my computer after the screen has been blanked, it requires me to entire my password in order to resume use of my computer. Is there any way I can turn this off?

This next question is unrelated, but I do still feel the need to ask. Why, exactly, did they move the minimize/maximize/close buttons from the top-right corner of the window to the top-left? I know that it probably feels natural to Mac users, but every previous version of Ubuntu has had these buttons in the top-right corner.....why on earth did they feel the need to change it? I've been using Ubuntu for a while now, and it's kind of annoying. Surely most people who've been using Ubuntu for a while were thrown off by this, as well? I doubt that there is any way to change it, but does anyone know if there is?

View 9 Replies View Related

Ubuntu :: Editing Nautilus Settings Returning Defaults

Jun 7, 2010

I finally have a working nautilus after weeks experiencing a seg fault caused by a dependency problem which I have only now managed to resolve.

It came right after doing this:

Code:
gconftool-2 --recursive-unset /apps/nautilus

I then removed nautilus-elementary ppa and downgraded the nautilus-data.

Problem is the nautilus I get is extremely minimal -- really just a window -- which insists on opening new windows whenever I click on a folder.

[URL]

I've tried removing .nautilus on several occasions.

What are the default settings?

Is there a more convenient way of editing nautilus?

Striks me this has something to do with settings gconf. I'm going to play around and see if any of them fix this creature.

View 2 Replies View Related

Programming :: Gcc Returning Undefined Reference?

Jun 23, 2010

I am facing the problem of calling cfitsio library from C program in linux. when i am givingthe option "gcc -o CreateLevel1DataFitsFile CreateLevel1DataFitsFile.c -lm -lcfitsio
"i am getting following error

/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(getcolj.o)(.text+0x7065):/backup/Astrosat/learning/cfits/cfitsio/getcolj.c:3098: more undefined references to `__xtoll' follow

[code]...

View 2 Replies View Related

Ubuntu :: Logon Screen Appears Twice After Returning Computer From Idle?

Jun 1, 2010

I've recently done a fresh install of 10.04 on an Acer Aspire 5720 and it went pretty well. However I've a problem with the logon appearing twice. If I leave my computer idle for too long the screen locks. when I return I'm asked for my password which unlocks the computer but within a few seconds the screen locks again and I need to enter my password for a second time. This time the computer unlocks and stay unlocks.. but it's annoying I have to unlock it twice !

How can I extend the length of time before it unlocks or disable it all together.. until the problem gets fixed?

View 9 Replies View Related

Ubuntu :: How To Remove Stored Passwords From Firefox Before Returning Computer?

Apr 11, 2011

I am returning a computer to the dealer and I want to remove all stored passwords from firefox. How do I do that? This is version 3.6.I also would like to remove bookmarks and history.

View 9 Replies View Related

Debian Programming :: Returning Different Values For Same Code?

Sep 11, 2014

I am developing a script to automate some database setup, but I have an issue I cannot figure out. I prompt for some input with whiptail and select a default if nothing is entered. However, if you do not enter anything, it normally returns 0, but this time it is returning an empty value.

Code: Select all  # This one does work!

  # Set the source path
  TMPPATH=$(whiptail --backtitle "Linux Build Configuration"
    --title "Source-Code Path"
    --inputbox "Default: $SRCPATH" 0 60
    3>&2 2>&1 1>&3)

[Code] ....

So what is wrong with the second code?

View 1 Replies View Related

Networking :: Box With 3 Dedicated IP's All Returning The Same Single IP Address?

Jan 20, 2010

I have a linux box, which was given to me by a company with 3 dedicated IP addresses. My goal was to setup ssh tunnels on all three dedicated IP Addresses.

Via Putty, i am successfully able to create a tunnel to the box's on IP1 IP2 and IP3 - that is i can make incoming connections on all three IP's.

However, my problem lies when i attempt to USE the tunnel. AIn all instances, regardless of the IP i actually tunneled into the box with, it returns IP1 as an outgoing connection, i.e if i setup IE to use the tunnel, it will return my IP as IP1, even though i have created the tunenl via IP2/IP3.

What id liek to accomplish is that when i create a tunnel via IP1, then outgoing connections go via IP1, and when i create a tunnel via IP2, then outgoping connectiosn go via Ip2 etc.

After discussing this with a colleague of mine, he infomed me he had the same problem at one point, and that some configuration on the box was required - however he was unable to recall.

View 2 Replies View Related

Networking :: Why Is Udhcpc Is Returning Etho0 Instead Of Eth0

May 3, 2011

I'm building a very small netbootable client, using a stripped down custom kernel and busybox v.1.18.4 (stable) with the embedded ifconfig and udhcpc applets

after startup, the initrd is loaded, and the proc, sys, dev and pts folders are properly created and mounted.

/proc/net/dev properly contain eth0 as an ethernet device.

in the init script I execute a background call to udhcpc passing the dhcp.script properly to udhcpc, and dhcp.script is then executed when the bound event occurs.

what I cant get past is udhcpc is passing back the interface evironment variable as etho0 (thats, 'eth' lowercase 'o' and a zero '0', when it should be passing 'eth0', thats 'eth' and zero '0')

I know I could hardcode the eth0, but i was hoping for a somewhat smarter system.

View 2 Replies View Related

General :: Pam_mysql_check_passwd() Returning 6 - Pam_mysql Authentication?

Aug 2, 2011

I'm having trouble with my pam_mysql authentication.'ve double checked my md5 password but its correct.What should I be looking at? My /etc/pam.d/system-auth is completely identical to my other server (that works), but this one is somehow reporting that my password is wrong.I've bolded out the questionable output.Here's my error log while trying to connect:

Code:
Aug 2 16:16:21 la2 sshd[8006]: pam_mysql - option verbose is set to "1"
Aug 2 16:16:21 la2 sshd[8006]: pam_mysql - option db is set to "hidden"

[code]....

View 3 Replies View Related

Server :: BIND Not Returning Windows DNS Hostnames

Jan 5, 2010

I have a situation where I have two DNS servers - a BIND one for our Unix hosts and a Windows Server DNS one for the Exchange and other Windows hosts. I set up the BIND server to slave from the Windows one, which it seems to do just fine.

Windows DNS has entries like "_gc._tcp.domain.local" in it, which are needed for domain logins, etc.

However, when I try to use nslookup on those entries, it fails when querying the BIND server. When I do a domain transfer with dig, I get all the answers I expect.

This failure means that the Windows boxes can't query the BIND server for the answers they need. By default, from DHCP, it is the BIND server they get, so that's a big problem. If I manually switch their DNS to the Windows server, it works perfectly.

View 1 Replies View Related

Programming :: Wcslen / _tcslen Not Returning Correct Value?

Feb 12, 2010

I have having some trouble working with wide characters, which is,

Sample code:
TCHAR fname[512];
_tcslcpy(fname, L"/root/Desktop/all/TheGrandTunnels.fgc", 512);

[code]...

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved