Programming :: Use Multiple Options At The Same Time?
Dec 4, 2010
I want to be able to use multiple options at the same time and some of those options will require an argument and some will not.
Here is my bash script:
#!/bin/bash
while getopts ":a:bc:de:fg:" opt ; do
case $opt in
a)
[Code]....
If I only use option -a with no arguments, the script works...
View 1 Replies
ADVERTISEMENT
Mar 10, 2010
I've worked out how to get ALSA libasound code working for an application. However I can't workout how to get multiple sounds working at once. I can't seem to find any google examples of mutiple sounds. EG tune plays while pressing buttons makes clicks. I'm using an embedded board so need to use ALSA not an addon e.g. sdlmixer, jack, etc.
View 3 Replies
View Related
Jan 24, 2010
I am using a perl script which uses curl in the background to download files from rapidshare premium,one file at a time. I wanted to know is it possible to use curl and spawn multiple connection at a time,to download the same file in multiple parts?? I don't seem to find an option in curl which does that.
View 1 Replies
View Related
Jun 15, 2011
I'm looking for a program that will digitally display the time in three different cities - all showing at once. I don't care if it is a panel applet or stand-alone. I'm using Suse 11.3 and Gnome.
View 5 Replies
View Related
May 20, 2010
How can I use grep to search for line with either 'res' or 'rep'? i try "grep -e res|rep" or gre -e "rep|rep" but that does not work.
View 3 Replies
View Related
Dec 27, 2010
When i right click a file and give open with,i can find lot of duplicate entries..How to remove those entries?
View 6 Replies
View Related
Jun 21, 2010
Previously I'd installed Ubuntu Netbook Remix (Lucid) on my Acer Aspire One 751h netbook. the machine came with XP installed, so I installed Ubuntu as a dual-boot setup. I had various problems with the configuration of Ubuntu (nothing to do with the boot process, and now solved) so I reinstalled it.
What I'd actually done with the second installation was to install it again alongside both XP and the original Ubuntu installation (maybe that was also a stupid thing, but I didn't know it would work like that). When I realised what I'd done, I did the stupid thing, which was to delete the partitions with the older installation and swap file (using the Disk Utility).
After that, the next time I rebooted I went straight into grub-rescue. I don't know much about this, but I found a forum entry explaining the basics, so I can now issue grub-rescue commands that let me boot into Ubuntu. I've run update-grub and my /boot/grub/grub.cfg file looks fine.
However, I think this only kicks in once I've got past the initial boot menu and have chosen Ubuntu (now on sda5 - hd0,5). My problem is that the files/processes that load the boot menu on startup still have the old configuration, so when I reboot I still go into grub-rescue and I get 'partition not found' (or, since I recreated the partitions, 'file not found') and root is at (hd0,7).
Is there a way, once I've got into Ubuntu, of changing the information in the startup boot menu Alternatively, if I copy my entire file system from sda5 into sda7, would that do the trick?
View 4 Replies
View Related
Mar 2, 2011
I am using Debian linux. I have 100 timers running. If a timer expired which will generate a signal and it was mapped to a same function handler. All the timers are mapped to one function handler. The problem is if the timer expires one at a time, the function handler called at a time. But if the 2 timers expires at a time, the function handler is called one time only instead 2 times. Is it possible to invoke the function handler as many times based on timer expirary happens simultaneoulsy?
View 14 Replies
View Related
Jun 9, 2010
Is there a way to get the current time as provided from NTP (not the currently set time on the server)?
View 4 Replies
View Related
Jan 12, 2010
I am trying to set time using settimeofday in linux. But it sets local time. i.e works like SetLocalTime in windows. But I want to set system time(like SetSystemTime in windows). I could'nt find no other api in linux. What should i do? I had tried with mktime/gmtime apis
View 3 Replies
View Related
Apr 3, 2010
I'm a noob but enjoying dual booting. However, every time I run update manager I get a new vmlinuz entry and now I have multiple boot options in my grub boot menu. Now when I have like 5 ubuntu entries to move past to select Windows. and the latest Ubuntu is always at the bottom so I have to annoyingly scroll down to select the latest there. I don't really understand what the vmlinuzXXX entries in the boot folder are for so I don't want to delete them. I've thought about editing the loop in the 10_linux file in the grub.d folder but it looks like its calling a function or macro or something:
Code:
linux='version_find_latest $list'
But like I said, I'm a noob to all this (a .Net developer on Windows professionally) and don't understand where this is. It looks like this function call has the logic I need to fix. Because its not finding the latest, its just finding all. How to I get back to one Ubunutu boot option like when I first installed?
View 4 Replies
View Related
Jun 24, 2010
Is there any way to run multiple instances of yum at the same time. The need is to speed up the install process.
View 2 Replies
View Related
Aug 18, 2010
I am having a souce file (say SOURCEFILE) as below with 5 columns and many rows.
pol name status loan address
123 aaa 21 100 RJY
234 bbb 31 200 RMY
345 ccc 21 300 SJY
456 ddd 41 400 pqr
i want to compare the file (say COMPAREFILE ) which is below :
123
345
I need the following output file (sayOUTPUTFILE) as below :
( ie for file COMPAREFILE i need column 2, column 4 ie name and loan from source file )
ie output file required is to be like below :
123 aaa 100
345 ccc 400
Till now iam using the following method.
1. cutting column 2nd column
2. again cutting 4th column
3. in third, step merging the 2nd and 4 th column.
method of writting single line command or any awk programme to do this in one step.
I need output file (say OUTPUTFILE) as below
View 1 Replies
View Related
Aug 6, 2010
I am having a problem unzipping multiple files at 1 time.
Proper unzip command that will:
1) extract the file from the zip.
2) remove the zip file.
All my zip files start with SB and end with .emi.zip
SB*.emi.zip
View 2 Replies
View Related
Jul 1, 2010
Is there any scanner that can scan multiple pages at a time? Without human intervention. Then put all the scanned pages in 1 tiff file or multiple gif or png or jpg files. A scanner that works with Linux. I need make and model.
View 1 Replies
View Related
Feb 21, 2011
How can i create multiple users at a time in rhel?
View 2 Replies
View Related
Dec 11, 2010
I am trying to build an application that must link with python so as to load a python module during runtime.I have this makefile :
Code:
[alex@iskandhar src]$ cat Makefile
CFLAGS = -Wall -O3 -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK
[code]....
View 4 Replies
View Related
Jul 9, 2010
I'm trying to compile and run a java application on Ubuntu 10.04. In the run drop down there are no run options in "run as". I have PDE installed but for some reason its still does not work.
View 1 Replies
View Related
Aug 8, 2010
I'm in Gnome but if I logout I can get to a menu where I can choose KDE as well as other window managers. The problem is I have a program that's running inside Gnome and I don't want to stop it. Is there some way I can get into KDE without having to stop this program?
View 3 Replies
View Related
Jul 1, 2010
I want to create 2 cron jobs daily
1st cron: Every day by 13(1pm) I want to stop the httpd service
2nd cron: Every day by 13:30(1.30pm) I want to start the httpd service
I tried but only 1 cron job can able to run at a time.
View 7 Replies
View Related
Oct 15, 2010
configure a server with two network interfaces? This system is physically moved from one network to another every few days (different buildings but connected by a VPN). I'd like to be able to control the IP address of the system depending on which port I plug the network cable into with a static setting. Right now the system will connect to the local network, but any requests to go beyond the subnet get lost. The only way I can get the system to talk outside of its subnet is to comment out the second interface.
/etc/network/interfaces:
auto lo
iface lo inet loopback
auto eth0
[code]....
View 2 Replies
View Related
Dec 12, 2010
I have 2 LAN ports. one from the motherboard (on board) and the other from a lan card i bought a few days back. one is use for browsing the net, the other for a media player.
problem is i cant connect to both the eth0 and eth1 at the same time. i have to disconnect one of them to connect to the other. and this really gets irritating as it doesnt always work as flawlessly as it should. what am i doing wrong?
Output of "ifconfig":
Quote:
I'm on ubuntu desktop 10.10 64 bit.
View 8 Replies
View Related
Oct 17, 2010
I run a small home server (Debian 4), which acts as my gateway to the internet (ie, firewall) and runs a web server, dhcp, dns, and acts as a file server to the rest of the machines on my home network. Now I know it's never a smart idea to have all those services running on the same machine that is acting as a firewall, but I don't fancy running multiple servers just for home use, as it's mainly allowing me to learn system administration.
I noticed a few days ago that my internet had become unbearably slow, to the point where I could sometimes not load web pages. I spent a while searching through log files on my gateway, to try and find out what was eating up all of my bandwidth. When I came to apache's access.log file, I was confronted with this:
Code:
204.45.41.82 - - [17/Oct/2010:06:25:10 +0100] "GET http://vewice6.nightmail.ru/marriott-grand-cayma.html HTTP/1.1" 200 36921 "-" "Mozilla/4.0 (compatible; M$
204.45.41.82 - - [17/Oct/2010:06:25:11 +0100] "GET http://malaysiapodcaster.blogspot.com/2006/05/blog-post_11.html HTTP/1.1" 200 58681 "-" "Mozilla/4.0 (com$
[code]........
Multiple requests to my server, for totally random websites. I didn't even know it was possible to make those types of queries to a webserver. The only thing that is on the web server is a browser based torrent client. I have only shown a small snippet of the log file, but there are around 90k lines to different web addresses, from many different IPs. What I want to know, is what is happening? :S Why is someone querying MY web server, for web sites totally unrelated to it? And most of all, how can I stop it. My initial was to try and use iptables to block multiple requests from the same ip within a certain time frame, which I think would work as the server shouldn't really get many queries from external networks.
View 9 Replies
View Related
Apr 1, 2011
Code:
Andrew@Mac:~$ g++ -march=athlon64-sse3 -O2 Projects/omgarrays.cpp -o Desktop/omg
Projects/omgarrays.cpp:1: error: bad value (athlon64-sse3) for -march= switch
[code]....
View 4 Replies
View Related
Aug 11, 2010
All day I have to connect to various unix servers via ssh or ovpn. These servers report the current ip hourly to our dns server. I am trying to minimize the few hundred times a day i type ssh myUN@xy1234.mydns etc to connect. 1234 being a store number.
I would like to create a login script that has 2 options. -o = ovpn and -s= ssh. Is this possible.
ssh muUN@xy____.mydns is always used for ssh.
openvpn --remote xy_____.mydns --config client.ovpn is always used for ovpn.
I would like to be able to type something like,
[jim@localhost tools]$ ./login -? 1234
again 1234 being the store number I need to connect to.
View 1 Replies
View Related
Jan 25, 2010
How can I disable structure alignment feature of gcc using command-line options ?I recently migrated to 64-bit OS, and doubt that I might be experiencing a structure alignment problem due to the new 64-bit architecture.I checked the sizes of the same C-style struct in both x86 and x86_64, and found out that they appear to be different by 20 bytes.I am not sure if this is due to structure alignment or the differences in data type lengths between two platforms.Hence, I will first disable the structure alignment feature, and then check the struct sizes again.
View 3 Replies
View Related
Feb 22, 2011
Is there any document or specification like the Linux Standard Base for the naming convention of commandline options?
View 3 Replies
View Related
Oct 11, 2010
I thought about this a while ago when reading through a Python tutorial and I googled some and couldn't find an answer. Now I want to know it for Ruby, also, and it's more important now because I want to invoke Ruby with -w.
How can you use:
Code:
with a -w option to ruby, like:
Code:
This doesn't work and I can't find an explanation of how to do it.
Code:
View 1 Replies
View Related
Dec 4, 2010
So, I usually write/find a test case generator for any code that I write. This type of code generally leads to some file output. To be thorough, I try and generate many different files to test my code on.
Say the command is like this:
Is there a way to automate this for many different values of the parameters and generate many different files?
I tried:
I wasn't able to use the $i in the filename, and without it the command gave me no errors, but did nothing else either. I know the Unix command line is very powerful, and I have a feeling that this should be possible, but I just don't know how to do it.
View 3 Replies
View Related
Feb 1, 2009
I am trying to rename multiple files in a directory and add the Date/Time stamp to the file name.
Example:
file1.txt
file2.txt
file3.txt
Renamed to
2009_02_01_21.txt
2009_02_02_21.txt
2009_02_03_21.txt
I am able to accomplish this using this command:
mv file1.txt "`date +%Y_%m%d_%H`".txt
But I want to automate this task, I have many files to process and I dont want to do them one by one.
I already tried this but it does not work
mv *.txt "`date +%Y_%m%d_%H`".txt
View 2 Replies
View Related