Ubuntu :: Calling Script With Argument From C Program?
Feb 8, 2010
I am trying to take argument from command line ic a Cprogram an give that argument as an argument to a script file which is called in that C program.Is it possible for example:
my C program is:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
[code]....
I want to fill that blank with thevalue of argv[1] such that it will act as an argument for temp1.sh.
View 3 Replies
ADVERTISEMENT
Mar 9, 2011
I have a new problem; i want to call a subroutine's fortran which have a function in the argument and the compilation ran properly, but when i execute the program this shows me an "Segmentation fault". This is my c++ program:
Code: //Main.cpp
#include <stdio.h>
#include <iostream>
[code]....
View 2 Replies
View Related
Feb 23, 2010
I'm trying to write a base script which will divide an argument by 10 and then use that argument in another program. Since my argument can be a floating point number, I used bc to accomplish this. Here's an example of a simplified version of what I have so far:
<code>NUM=$(echo "scale=25;$1/10" | bc)
#make sure the first argument was formatted correctly
if [ $? -ne 0 ]
[code]...
View 4 Replies
View Related
Oct 27, 2010
I read somewhere that you should not be reading config space to determine the irq value to pass as the first argument to request_irq(). What is the proper way to determine the value of the 'irq' argument before calling this function? Hope this is the correct forum. I don't see one for drivers.
View 1 Replies
View Related
Dec 3, 2010
(For function arguments): Scalar arguments are passed by value, which means that a copy of the argument is made for processing in the function, and changes to the argument in the function won't be reflected back to the calling program. Objects though, are passed by reference: any changes to them in the function are reflected in the calling program. What sense does this make? Why have they done this?
View 3 Replies
View Related
Mar 1, 2011
How does a C program start in linux? Is main() the first function called in the a c application by kernel. I understand it is the first called function written by the application programmer, but the question is to understand the what all kernel does and what all functions it calls before calling main()
View 9 Replies
View Related
Apr 3, 2011
when i call the "system()" function from my C program everything works well, but when i try to call it from a cgi C program it doesn't work. the server log tells me this is a permission error.i have chmod'ed 755 the cgi program but it still does not work.
View 5 Replies
View Related
Nov 27, 2010
I would like to call some firefox macros from bash so that I can manipulate them in some scripts. Does anyone know how to do that?Currently I'm using the imacros firefox add-in
View 1 Replies
View Related
Jul 12, 2011
I'm booting from the bash command line, and I was wondering if there is a way to make it to where when 'gdm' is called it is always called as if it had root permissions. Just so I don't always have to type 'sudo gdm' and enter a password (which would require entering a password twice, since the gdm splash screen also asks for a password.)
View 4 Replies
View Related
Jun 4, 2010
I have a question about calling an asm function from C....It doesn't work unless I create an asm variable to hold the value of the function in....Why?Here's the code that doesn't work...
asmfile.s - version one Code: .section .data
mydata: .ascii "this is the message!
.equ mylen, . - mydata
[code]...
View 2 Replies
View Related
Feb 7, 2011
I am doing a web site program and what I need is to call a C program in the PHP cloud.Do u think it would be possible? The web site would get the user input from PHP UI and pass to the C program , the C program would process the function with the user input and output the a PHP page.
View 2 Replies
View Related
Feb 27, 2010
I'm running the latest version of Ubuntu, and have upgraded the NVIDIA drivers to the latest ones from the website (not sure if that's part of the problem). I've got XBMC installed and it seems to be working, but I can't for the life of me get anything but Stereo passed over HDMI, according to my Onkyo 606 amp that is anyway.Can anyone tell me if it's actually possible, or if they've actually managed it, to get surround sound playing over HDMI on an ACER Revo running Karmic?
View 1 Replies
View Related
Jun 26, 2010
I have a strange problem on my MythTV PC: From time to time when I watch TV or a video in VLC the picture freezes but the sound will go on. After some time the picture comes back, first with some ugly artifacts in it and then completely. I've found out by letting htop run in the mean time that during these time CPU usage spikes up to a 100%, I also identified the process causing it (see attached screenshot)
Code:
/usr/X11R6/bin/X :0 -br -audit 0 -auth /var/lib/gdm:0.Xauth - nolisten tcp vt7"
but I have no idea what it does or why it behaves that way. Can someone fill my gaps here? By the way I'm not running Mythbuntu, but Ubuntu (gnome) with a mythback- and -frontend (don't know whether that's relevant though). I have a nVidia graphics card and a dual screen setup.
View 2 Replies
View Related
Oct 11, 2010
I need a new web cam to work under currently 10.04 but by the end of the week 10.10! Anyway the revo is not that powerful specs here:
Processor: Intel Atom Dual Core 330 1.6GHz
Memory: 2GB
Graphics Card: nVidia ION
good cams that work well on the revo's low power?
View 1 Replies
View Related
Nov 14, 2010
Skype has to be restarted before making a call in order audio to be able to work properly. Any idea how to fix it?
Ubuntu: 10.04.1 LTS (lucid), Kernel 2.6.32-25-generic-pae, i686
Skype: (beta) 2.1.0.81
Laptop: Packard Bell BV, EASYNOTE_MX52-B-702NCD
Motherboard: T12UV, PACKARD BELL BV
View 1 Replies
View Related
Feb 19, 2010
I am having some weird problems with calling commands stored in a variable (I need to do this to assemble a command with a bunch of parameters automatically and then execute it).Example code that will replicate the weirdness:
$ echo "hello world" > "test file.txt"
$ cat "test file.txt"
hello world
[code]....
I would expect the output to be:
hello world
What happens to the quotes? I have tried various combinations of single quotes, escaped quotes, etc, but it seems like quotes in a variable are not evaluated as quotes when that variable is executed.
View 9 Replies
View Related
Feb 24, 2010
I'm using Amarok 1.4 and when I select the playlist=>burn to CD, k3b doesn't apear. I get the prompt that asks if I want to make an audio or data disk. Only the Audio CD works; the data disk option doesn't work.
View 9 Replies
View Related
Aug 13, 2010
I want to call c exe from java source code and i want to interact with the c program during it's execution, i am able to send the parameters to c program but i am not able to interact with it.
View 3 Replies
View Related
Jun 13, 2011
I have to call URL from shell script. E.g.: www.google.com. How can I call URL from the shell script.
View 6 Replies
View Related
May 13, 2011
Suddenly, i have problems when i call a script when i use some arguments/variables
Here is my code:
Code:
This is my output:
Code:
View 3 Replies
View Related
Apr 3, 2010
[URL]
Code:
/* bsearch example */
#include <stdio.h>
[code]...
View 1 Replies
View Related
Feb 17, 2011
I have found a weird behaviour on a linux application. A tty seems to get closed without calling close. The program is (very simplified) as follows:
Process 1:
configure_signals()
read_config_files()
create_threads()
wait(forever)
Thread 1:
fd=open(/dev/ttyXX)
usleep(a while)
config(fd)
I have spent quite a lot of time on this problem. It seems like the file is sometimes closed when reaching config(fd), but removing the usleep(a while) seems to remove the problem.
View 1 Replies
View Related
Jul 17, 2010
I have a bash script that changes the iptables.Now i call this bash script in my php code.When this bash script is running the part of code that contains iptables instruction is not running because we need to be in superuser mode(root)
View 14 Replies
View Related
Apr 15, 2009
I'm trying to call some Fortran 95 code in C, but I'm having problems with integers not having the same value in C as in Fortran, and changing values upon each run of the program. I think it has to do with the integer type, but I don't know how to fix it. I'm running Gentoo x86. Here are the files I've got:
foo.c:
Code:
#include <stdio.h>
extern int qux_();
main() {
[code]....
View 2 Replies
View Related
Aug 19, 2010
What is the difference in perl between:
'function();'
and
'&function();'
with and without ampersand.
View 1 Replies
View Related
Jul 30, 2011
i use the sockaddr_in like this before calling bind(), it works good.
Code:
sockaddr_in serveraddr;
serveraddr.sin_port=htons(5000);
serveraddr.sin_addr.s_addr=htonl(INADDR_ANY);
serveraddr.sin_family=AF_INET;
[Code]....
View 2 Replies
View Related
Jun 20, 2011
I tend to use commands like 'aptitude search $something' or 'dpkg -S /usr/bin/command' (some command/variable in both) or 'apt-file search $something' and all/or many of its brethen. I do run updatedb every now and then but that command is for the overall health of the system similar to tracker perhaps (but not running continously like tracker and the daemon).
What I'm looking for is, if there is a way to get the package list (installed and otherwise) updated aggressively so that whenever I use any combination of aptitude or dpkg I get better response from the system. From what little I understand, aptitude or dpkg or somewhere there would be some sort of index/database where the current state of package availability and system state would be recorded. If there is a way that this could be improved upon would be nice to know. If there is some experimental package or road which the debian folks are looking for in the future so this latency can come down.
View 5 Replies
View Related
Sep 14, 2009
Browsing thru the dmesg output, I saw this:
cfg80211: Calling CRDA for country: MX
cfg80211: Regulatory domain changed to country: MX
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[code]....
Wireless works fine, but I'm not currently in Mexico, so where is this coming from?
View 1 Replies
View Related
Feb 4, 2011
I have a simple code like below. when I run this command javac callSMSClient.java I get this erros. Any solution to this please?
View 13 Replies
View Related
Sep 8, 2010
I've just come across the stolen laptop thread where Prey was discussed to help track a stolen laptop. Since I'm going to a trip with my laptop I thought I'd try Prey.
I installed it from the link Malcom posted but cannot figure out how to configure it. I ran the menu item which asked for my root password after which nothing seemed to happen. How do I add the API and key? In the Prey web control panel it says my device is unverified.
View 9 Replies
View Related