General :: Make Shell Script Wait For A Particular Key Pressed In Order To Proceed?
Jan 30, 2010
i've been searching all over the internet for a way to let the user press a particular key let's say 'y' without the user having to press [Enter] as confirmationfor yes, this would then run another function.
Quote:
Book Inventory Summary Report:-
Title, Author, Price
______________________________
StarWars EP1, G.Lucas, $49.59
Harry Potter, Rowling, $45.98
The Matrix, Mr. Smith, $53.98
Press 'y' to make a copy of this result into a file or 'n' to return to the main menu.. I understand the "press any key to continue" would go something like
Code:
read -sn 1 -p "Press any key to continue.." But i try many different ways of getting the "press a particular key" function, and none of them works.
View 5 Replies
ADVERTISEMENT
Dec 31, 2010
How to setup LXDE (a linux desktop environment) to hibernate a PC after the power button on the computer is pressed?
View 1 Replies
View Related
May 6, 2011
I have a third party application with a database.
I have created the service but it does not wait for the database to shutdown before the systems continues with the shutdown.
This results in the database being seen as crashed.
here is my stuff i did.
CACHE START AND STOP SCRIPT FOR REDHAT
#vi /home/cacheusr/cache_ctrl
Insert below
#!/bin/sh
#
# /etc/rc.d/init.d/cache_ctrl
# Cashier Control Script
#
# chkconfig: 2345 55 01
code....
View 9 Replies
View Related
Mar 10, 2010
Is it possible to make a key print a different character while a certain other key is pressed using xmodmap?
View 14 Replies
View Related
Mar 16, 2010
I'm writing a script that needs to spawn 2 or more processes and wait for their return status. I have a method to do this by waiting on each process individually like this:
Code:
process1 &
PID1=$!
[code]...
View 14 Replies
View Related
Aug 21, 2010
How can I make GRUB boot into Windows 7 automatically and display the boot menu when I press SHIFT at bootup. I am using GRUB2.
View 2 Replies
View Related
Dec 20, 2010
I have done a new install of Fedora 14 but the RTL8191 wirless card is not being recognised. Realtek have provided the driver source but the make operation is failing because (I think) Fedora 14 isn't provided with the kernel source to enable it to complete successfully.
Basically (in easy to understand steps): how do I download correctly the Kernel source to enable the driver make operation to proceed?
View 14 Replies
View Related
Apr 25, 2011
how do I make conky wait to start? I have read the post how to do it but when I try it says file not found.
View 9 Replies
View Related
Nov 26, 2009
I'm using bash script now,and I want have a script that can do like this: first ,tell me it will shut down ,and then shut down.My script looks like this:
#!/bin/sh
/usr/bin/curl $stop_page
shutdown -h now
[code]...
View 4 Replies
View Related
Aug 13, 2010
I recently upgraded to Ubuntu 10.04 from earlier versions. I have a dual boot system with Windows 7. Grub was set to boot Windows by default Things were working fine. I decided to upgrade to Grub2. It seemed like a good idea at the time. Now when booting up,the name at the top of the Grub menu is 1.98, which is Grub 2. When I run grub-install -v, it comes back grub-install (GNU GRUB 0.97) which is not Grub2. Now when I boot up, Ubuntu 10.04 is the default. I have to manually choose Windows if I want to use that system. I have been unable to change the boot order following instructions from this site. Any Way changing the boot order to make Windows 7 the default. I am using a Toshiba Satellite.
View 5 Replies
View Related
Apr 2, 2011
i have auto login and a ultra simple admin password, so it wasn't hard for them to mess with stuff...so when i came home i see that they had gone into terminal and added something to my system. i cant recall what it was because as soon as i saw in the history "warning this will make permanent changes to your system do you want to proceed" and the falling yes i got up and started bitching out my roommate and when i was gone someone had closed terminal. i was wondering is there is a way to search my recent terminal activity to see what was done so i can then find out if i can fix what was done?. or is there another option i should look into?
View 5 Replies
View Related
Aug 18, 2010
in my text file of 5 columns 2 column is in DDMMYYYY format. (ie DATE OF BIRTH). how to use sort command for its ascending order and descending order.
Is the same can be use for the date format YYYYMMDD ?
View 3 Replies
View Related
Dec 27, 2010
I've recently got myself a new laptop which I would like to install the Linux Mint 10. But there's some problems with the installaton. Just when it's about to wrap up it stalls and I can't proceed and complete the installation.
View 14 Replies
View Related
Mar 21, 2011
Examples:
Code:
$ ./test.sh -a -c 2
operator is -gt
remcount is
^ value missing!
Code:
$ ./test.sh -b -c 2
operator is -lt
remcount is
^ value missing!
Yet when "-c" is the first argument, its value is present:
Code:
$ ./test.sh -c 2 -b
operator is -lt
remcount is 2
What could I do to ensure the value of "-c" is picked up regardless of the argument order?
View 5 Replies
View Related
Jul 22, 2011
I have a problem to make a shell, using mail command DestMail= cat /opt/scripts/maillist.txt mail -s"SUBJECT" $DestMail -- -r xxxxx@gmail.com < /opt/scripts/test.txt where: maillist.txt contain email adresse separated by comma test.txt mail text this script can eval DestMail variable!!
View 1 Replies
View Related
Jul 27, 2011
I am setting up a cron job, where i am calling a shell script to make few builds. I got struck at a point, need some expert inputs to proceed further. The script is categorized in 5 parts and in the last part while building software it asks for few questions like:-
1. Build mode choice
2. normal build
3. Copy Images
4. Arch
User manually has to input ans for these questions:-
1
yes
n
64
The ans's are fixed and this won't change. How shall i hard-code them or do something in the script so as when script flow reaches to this point it automatically take's these value. So far the cron job is not getting completed as it's waiting for user to key in these values manually. I had faced similar issue while building kernel modules but there it was easier as i had to take default values always:-
View 2 Replies
View Related
May 26, 2011
Consider that I am building my application in Linux shell using make command but somehow the build fails. Is there any way I can find out that the build has failed (of course looking at shell for error messages will do the job for me but I don't want that). Is there any flag make or shell will set/reset if such failure occurs ?
View 5 Replies
View Related
Jun 27, 2010
Trying to write a shell script called make to read a file called dirs with the following in it
programs
scripts
documents
Read file line by line and make the directories in the current directory when you type ./make dirs if no file is given then program should print usage:
make dirs filename
View 3 Replies
View Related
May 23, 2010
When I run large rsync sessions (backup purposes), I often find that the cpu goes up to 100% on both cores, and the systems gets almost unusable as slow it is. Top reveals around 80% is reported as "wa", which is IO Wait right?
Well, using the CPUfreq applet, it is possible (but irritatingly sloow) to manually set the cpu frequency to the highest possible. After this the computer gets much more snappy. How can this be done without manual intervention, anyone knows?
View 1 Replies
View Related
Jan 10, 2011
I want to prevent "^C" from echoing when Ctrl-C is pressed. I did "stty -echoctl" which some googling results suggested. Now it echos raw Ctrl-C characters instead of the string "^C". That's not any better since it displays some funny blocked hexadecimal in the terminal window.
View 8 Replies
View Related
Jul 31, 2010
I have a laptop running Ubuntu 10.04 and i want to make a shell script and I want a beep sound but I can't get one..
I tried this and i didn't hear any beep
View 4 Replies
View Related
Sep 15, 2010
I want to gave much details as possible. working directory (~/a1/shell) in the shell directory i have Makefile. also in the shell directory i have subdirectory's (obj, src, include)
My current Makefile
Quote:
#What needs to be built to make all files and dependencies
clean:
# End of Makefile
I wanted it so: all .o files are created in the obj subdirectory, and my application, sshell, is created in the shell directory.
I am getting this error when i run the make run: No rule to make target 'shell.h', needed by 'shutil.o'. stop
View 1 Replies
View Related
May 21, 2010
I am trying to write a shell script in order to automate the process of uploading a file onto an FTP server using the built in FTP commands in ubuntu server (lucid). In order to connect I can use the following:
Code:
ftp wsbeorchids.org.uk
Name (wsbeorchids.org.uk:danielgroves): USERNAME
Password: PASSWORD
In need to pass my username and password in when prompted the prompts. How should I go about doing this? I have tried echoing the values without success. Please not that I am something of an amateur with scripting.
View 6 Replies
View Related
Jun 20, 2011
I just installed Gnome Shell in Ubuntu 11.04 through UGR Linux and everything works fine! The only problem is that I cannot run make and make install. I get the following errors:
Code:
alexandros@Autobot:~/gnome-shell/source/gnome-shell-extensions$ make && make install
Making all in extensions
make[1]: Entering directory `/home/alexandros/gnome-shell/source/gnome-shell-extensions/extensions'[code]........
View 3 Replies
View Related
Apr 9, 2011
I have a 3ware controller that has a RAID 1 of two SATA disks.After an outage, the linux box (which is running ubuntu), restarted and the partition is now mounted read only. I only have the "/" mount point (this is a test server).Now, if I go to the 3ware controller by pressing ALT-3 while booting, I don't see any indication that there is something wrong with the disks.If I let the computer boot, I'm asked by fdisk if I want to fix/ignore/etc the inconsistencies found.
View 1 Replies
View Related
Feb 5, 2010
i installed the free PacketIX vpn client on my ubuntu 9.04. it created a virtual network adapter, i was able to configure and connect to the VPN service but when i add a default route to the routing table so that all internet traffic goes through the VPN, my internet connection stops working until i remove the line i added.
here's my routing table before :
Code:
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.222.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 vpn_vpn
0.0.0.0 192.168.222.2 0.0.0.0 UG 0 0 0 eth0
and after i add the route:
[Code].....
View 2 Replies
View Related
Mar 19, 2009
My boot order has automatically changed, before I was booting Windows XP/ Vista as the default OS, now all of the sudden Fedora has become the default OS. So plz help me change the boot order. These are my grub settings at the moment.
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
[code].....
View 9 Replies
View Related
Aug 23, 2010
I have a sh-tty B/G wireless card that does 500mw according to iwconfig. I also have a nice little panel antenna on this card that does 7dBi. This rig picks up a lot of signals and that is really great. However I am experiencing a problem. I am able to Internet browse on non-encrypted networks as long as the wireless manager shows a full four bars. However, if I try to connect to a three bar network, I will not be able to browse the Internet. I have a solid lower level 3 bars, I'm assigned an IP addy, but I get absolutely no throughput.
So, I think this has something to do with receiver sensitivity. In G mode, this card does a lousy -65ish or so at 54 meg. So what I'd like to do is drop to 5.5 or 11 meg B because at 5.5 meg or 11 meg B, the card does a much more acceptable 90+ sensitivity.Does anyone have the command string/app for this? I would like to force a card to operate in no better than 802.11B@5.5meg rather than having it auto select 802.11G@54meg.
View 1 Replies
View Related
Aug 5, 2010
I am running a dual boot with Windows 7 pro and ubuntu.
How do I change the boot order to make windows 7 the default start up??
View 3 Replies
View Related
Jul 8, 2010
I have a webserver to host some system application to the public. the server have two network interface. I set eth0 with wan IP and eth1 with internal LAN IP.the reason for the internal ip on eth1 is to enable LAN pc directly access to the webserver application..is this configuration is ok. sometimes the server link down and i have to restart network to get it back to normal again.. Is there any additional configuration in order to make the network stable.
View 4 Replies
View Related