General :: Executing PHP File And Read Output To Program

Jun 29, 2011

I'm using Ubuntu and I'm programing with eclipse CDT. My goal is to execute a php file and read the output to my c++ program. To do so I thought I should use fork(), dup2() and execl. When in shell, the call "php myscript.php" worked just fine, but when in c++ I tried:
execl("usr/bin/php", "php", "home/geiger/workspace/SemiServer/server_content/myscript.php", NULL);
And it didn't work (the process wasn't terminated and I got no output). I tried different version of this call, like losing the "php" string and/or drop "home/geiger" from the path string, to no better result.

View 1 Replies


General :: Read And Execute Permissions For Executing The File

Mar 2, 2010

Binary files need only execute permission to execute. No read permission is required. But all executable files must be read by the kernel into main memory before executing. Also script files need both read and execute permissions for executing the file.

View 5 Replies View Related

General :: Executing Binaries - Pass The Hostname As A Variable Or Read From A File?

May 2, 2010

I am looking for a clue in shell or ant script, where I excecute a binay file on linux. For example ./myfile.bin which ask me few questions.

./myfile.bin ...........................100%

I would like to automate this process where I want to pass the hostname as a variable or read from a file is it possible? If yes any sample`s on this. I can do if this was a shell script ($1) but not sure when its binary.

View 8 Replies View Related

General :: Get The Output Of Script To Both Screen And File By Just Executing Name Of The Script?

Jun 2, 2011

I have a script, I am able to send the output of the script to both the screen and a file as shown below


./script | tee -a temp.log

I wonder is it possible to achieve same thing by executing some commands inside the script. As for other users, who execute the script it is not advisable to pipe the output of script with the help of tee command. Again, keeping |tee at the end of every line of the script doesn't seem to be advisable. I tried with this for couple of lines and it works. Is it possible to get the output of script to both screen and file by just executing name of the script, with some script tweaking ?

View 4 Replies View Related

General :: Read Three Files And Print Output In A New File?

Sep 9, 2010

file1: have DNA sequences and each sequence will begin with > symbolfile2: have protein sequence and each sequence will start with > symbolfile3: BLAST result of file2 and each result will start with query= .my problem is i have to make a report file by combining these three in such way that first sequence from file1,first sequence from 2nd file and first result from file3 should be printed in a report file

View 14 Replies View Related

Fedora :: Allow Executing File As Program?

Apr 18, 2011

i have many text files in my directory and when i click on them to open them os treat it as a runnable file any says display or run or run in terminal ... i want to pick up recursively the tick of "Allow executing file as program" for all files.

View 2 Replies View Related

Ubuntu :: Allow Executing File As Program?

Apr 22, 2011

On the `Install Properties` Menu , I am not allowed to check the: Allow executing file as program...

View 2 Replies View Related

General :: Read Data From Text File And Output Into A Table?

Apr 12, 2010

I'm having a slight dilemma on reading data from a text file and outputting it into a table then displaying it. Basically I'm writing a shell script that takes information from text files then outputs the data into a table with 4 headings.he extracting of the data is fine, but creating a table i'm having problems with. I think it is possible to do it using the awk function, but so far i'm having a lot of difficulties.

View 14 Replies View Related

Ubuntu :: Can't Mark Allow Executing File As Program / Resolve This?

Oct 23, 2010

Yesterday,I upgraded to ubuntu 10.10
then when i try to mark allow executing file as program it unmarks itself although i used it on ubuntu 10.4

View 9 Replies View Related

Fedora :: Unable To Check "allow Executing File As Program" In File Properties - Permission Denied

Feb 27, 2011

Im trying to run a program but my system won't let me.i used to be able to run executable files without a problem but i can't anymore when i double click the file i get "there is no application installed for executable files" i am unable to check "allow executing file as program" in file properties there is a script file which runs the program but all i get from the terminal is "permission denied"

View 14 Replies View Related

General :: SSH - Error Executing Script (Output For Only One Server)

Jul 14, 2010

I am writing a script which will fetch data from different machines and display it on single terminal. I have created a file named SERVERNAMES containing ip address of machines I need to monitor. Then for every IP I am issuing ssh command to get date on that machine. However When I am trying it on the script it is just giving me output of first server and it is ignoring rest servers mentioned in file. ssh works fine without password for all machines mentioned in SERVERNAMES.


while read line
#Calculate Load on remote machine.
Date=`ssh -T -q $line date`
echo "Date on $line is:$Date"

Date on is:Wed Jul 14 10:48:46 IST 2010
I am not getting the output for .
Is there anything wrong in ssh?

View 5 Replies View Related

General :: Remove Unwanted Output That Comes From Executing System Api?

Apr 27, 2010

How to remove unwanted output that comes from executing system api?

for eg:when i execute system("telnet") i want the output to start with login and then password and then directly the command prompt,how can i remove the output that gets generated before showing the prompt?

View 3 Replies View Related

Ubuntu :: All .rtf Files Have "Allow Executing File As Program" Box Checked Under Their File Permissions

May 17, 2010

A bunch of my .rtf files suddenly (within the last few days, not sure when) have the "Allow Executing File as Program" box checked under their file Permissions. So whenever I try to open an rtf document, it asks if I want to run it. What's up with that?

View 3 Replies View Related

General :: Program That Reads Multiple Pipes / File Descriptors And Writes To Standard Output

Feb 23, 2011

Is there already a program that reads multiple pipes or file descriptors and writes to the standard output (not splitting lines).Like cat, but reading all files simultaneously and preserving lines.It is needed to avoid coding of select/epoll loops or using multithreading in simple programs. Like "select loop for bash".

View 1 Replies View Related

General :: Executing A Program From Command Prompt?

May 27, 2011

I'm trying to run an application from the command prompt. I've set the path in .bashrc. My executable file and all other files needed by it are saved in the same directory as the path. When I enter the executable name to run it, I get an error message saying that the command is not found.

View 14 Replies View Related

Programming :: Read A Txt File With C++ In Linux And Output It?

Mar 15, 2010

i have wrote a long piece of code above with the "main" which is calling openFile( &fout, filename )filename contains the txt name in a form of "data.txt"i wanna read the data from the file and output it into fout for later use.the data in that file is a vector looking interger group.i have the following code:

int openFile( ofstream * fout, const char * filename)
ifstream iFile(filename);


View 1 Replies View Related

Ubuntu :: Can't Get "allow Executing File As Program" To Work

Apr 14, 2011

ive got a second hard drive which is ntfs. it's got some windows programs that i'd like to run in wine. problem is i can't get "allow executing file as program" to work. when i click that, it doesn't stick.

View 9 Replies View Related

General :: Windows Access The File From Ubuntu Got Read Only Even Though Have A Full Permission To Read, Write And Execute The File?

Feb 4, 2010

What are the possible problem when Windows access the file from Ubuntu got Read Only even though have a full permission to read, write and execute the file? Ubuntu to Ubuntu accessing the file there is no problem only Windows got a problem.

View 1 Replies View Related

Programming :: No Output To Log File From Daemon Program?

Mar 18, 2011

I am learning Linux daemon programming and write a simple daemon program. The issue is no data is written to the log file (/var/tmp/simpledeamon.log) though the file is successfully created (it's file size is zero from ls -l output). Could someone kindly point out the error in my program,The code is based on the Devin Watson's article at Here is the code:

// simplydaemon.cpp
// A simple Linux daemon.
#include <sys/types.h>


View 2 Replies View Related

Programming :: Write A Program Which Will Read Input From A Text File

Apr 7, 2010

i am trying to write a program which will read input from a text file, check if each line contains any alphabets and then display a message imforming me if there is an alphabet in each line. My text file is formatted in this way...


View 2 Replies View Related

General :: Executing File Of Some Other Directory From PWD

Jan 14, 2010

My present working is
linux:/home/anisha/downloads/mapnik-0.6.1/demo/c++ #
Now I want to run "python scons/" located in
linux:/home/anisha/downloads/mapnik-0.6.1/ #

I tried
../../python scons/
From the above stated PWD but it resulted in the following:
bash: ../../python: No such file or directory
What is the way to execute a file of some other directory from the PWD!

View 14 Replies View Related

General :: Executing Awk Script Without File Name?

Jul 15, 2010


#!/usr/bin/awk -f
BEGIN{ FS=":"}
"groups "$1 | getline grps


View 5 Replies View Related

General :: Executing And Killing A Process From Sh File?

Dec 21, 2010

i have recently started a bit of sh coding. i was trying out sm commands from an sh file.

txt1="top > temp.txt"
eval $txt1


View 14 Replies View Related

Ubuntu :: Executing Any Program After Download?

Sep 4, 2010

After downloading any program thats in ubuntu or uses wine to run before i can run it i've got to allow it to execute, is there a workaround for this? Im using 10.04 ubuntu desktop

View 1 Replies View Related

General :: Executing The Default Application Assigned To A File Type?

Dec 10, 2010

Using gnome terminal (Ubuntu 10.10), is there a way to execute the default application associated to a file type, only by typing its name, as it is possible with Windows ?

For example, say I create a mime type associated to every file with the pattern *.abc. Lets say I associate this file type to application 'my_app'.

If I have file '' in current folder, what I want is that when I enter only '' at the prompt, it executes 'my_app' feeding it with '' as first argument. (assuming of course 'my_app' is in the path)

View 3 Replies View Related

General :: Executing File Resulting In Permission Denied Error

Apr 21, 2010

I am wondering why running this file:

-rwxrwxrwx 1 root root 1247 2010-04-21 18:25
by issueing this command:

results in this message:

-bash: ./ Permission denied

I'm logged in as root and prior to the above I did a chown root:root on the file.

View 3 Replies View Related

General :: Unexpected Output From Program?

Sep 8, 2010

while doing socket/network programming, i am getting SSH-2.0-openssh4.7 error, instead of showing day time of server.general description i have Linux Box, with the help of putty i am connecting from windows system to Linux box,no problem in loging,after typing program, i am running the program with gcc. when typing ./a.out, it is showing SSH-2.0-openssh4.7, actually it should display daytime from linux box in both tcp and udp.

View 1 Replies View Related

Ubuntu :: One Of My Program Is Not Executing - Fgsd Crashed

Jun 7, 2011

I m using ubuntu 10.04. I have install flightgear Scenery designer(fgsd) and it executed successfully, but during working on it I selected any option of it and fgsd crashed. After that it is not getting execute. Throwing following error on console. buffer overflow detected ***: fgsd terminated

View 1 Replies View Related

Programming :: Why Fork Is Executing The Program Twice From Start

May 25, 2011

I am learning about OS and I wrote this simple forking program... Here's the code..

#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>


How can it print the first statement, that is BEFORE the fork() statement twice?

I am running Natty 11.04 btw..

View 8 Replies View Related

General :: Recovery Disc States Cannot Read Input/output Error?

Nov 15, 2010

Pavillion laptop crashed and I can not find all of my recovery discs. The computer will not allow me to do an internal recovery so I ordered a recovery download on line and burned to a disc. when I put the disc in the graphics came up and in started in Live-mode but then the error mess came: error while loading shared libraries: /usr/lib/ cannot read file data: input/output error. The site said it was an ISO file but then it had a program it had me run to change it and burn the disc.

View 1 Replies View Related

Copyrights 2005-15, All rights reserved