Ubuntu :: C++ - Use System To Call Echo And Pass Variables?

Sep 7, 2010

I'm trying to use system to call echo and pass variables to it. That was a success. The problem is the variables inside the while-loop i wrote cannot be manipulated. what I'm doing wrong here? here's the code:

Code:
#include <iostream>
#include <stdlib.h>
#include <string>
#include <sstream>

[Code]....

View 7 Replies


ADVERTISEMENT

General :: Echo Password To SU - PPPD Call Idea

Feb 25, 2011

I have to run "pppd call idea" command from root shell every time to connect to internet from mobile. Now I want a script so that I just run it to connect. Something like :

#!/bin/sh
echo "password" --stdin | su -
pppd call idea

But its showing error that "standard in must be a tty". Why is this. Using CentOS 5.5

View 2 Replies View Related

Software :: What Is Different From Sending Call Command Within Minicom 2.5 And Echo It?

Jun 11, 2011

I have a router with linux firmware and attached to it a USB modem with which I can do both data and voice.Any other command send through echo method works ok. I was able to send SMS, edit phonebook and many many other stuff, but not make a call.So what is different from sending the call command within Minicom 2.5 and echo it?

View 1 Replies View Related

General :: Possible To Pass JavaScript Variables To Bash?

Apr 18, 2011

Can I pass javascript variables to bash script? If possible in bash script what code should I insert to receive javascript variables.

View 14 Replies View Related

Red Hat :: Call CGI W/POST Variables From Shell?

Jun 16, 2009

I've got a CGI that I'm trying to debug. Apache gives me an ambiguous 500 error; it would be nice to see the raw output via the shell. I've got the POST request w/headers as follows. What's the best way to troubleshoot this?

POST /cgi/packBoxes.cgi HTTP/1.1
Host: 70.87.60.214
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

[code].....

View 1 Replies View Related

Programming :: Can't Pass Variables To A Program In Bash Script / Fix It?

Dec 30, 2010

Trying to do a simple bash script, and having some issues. I am relatively new to bash, and did my best to search, but idk what exactly to search for.

Doesn't work code...

View 6 Replies View Related

Programming :: Write Scripts To Pass 2 Different Variables To Find Command

Aug 18, 2010

i am trying to write scripts to pass 2 different variables to find command.

find . -name $var1 -exec grep -H $var2
find . -name CDR_2010-07-21 -exec grep -H 9892614477 {} ;

1st variable CDR_2010-07-21(passed by var1) is the file name inside which i am trying to search string 9892614477(passed by var2). i have tried following script

[code]...

View 9 Replies View Related

Software :: Script That Call A Java Program That Call A System Command?

Nov 29, 2010

In practice I have a script that call a java program that call a linux system command. The script if I run it, from a shell functions well,so it is not a java problem. The problem come out when i put this script in a crontab schedulation. The result in this case is that java do not execute the system command. I think it depends on crontab

View 4 Replies View Related

Software :: Dependency - Set The GTK_CFLAGS And GTK_LIBS Environment Variables To Avoid The Need To Call Pkg-config

Jan 29, 2011

I'm trying to install ettercap from source on my clearos box (centos based) and I'm running into an issue with a GTK dependency. When I run ./configure for ettercap, it tells me I need to install GTK, Pango, or ATK. But, I've installed them all with yum, and the -devel versions of them too. For example I did "yum install gtk+" and "yum install gtk+-devel" for GTK, Pango, and ATK.

But even though I installed all these dependencies, I'm still getting this error. I'm thinking the problem is that it's looking for gtk, atk, or pango in the wrong place. A copy of the relevant error section produced by running ./configure is below:

[Code]....

Alternatively you may set the GTK_CFLAGS and GTK_LIBS environment variables to avoid the need to call pkg-config. See the pkg-config man page for

View 2 Replies View Related

Programming :: Want To Pass Variables To Perl Script From Php Script

Jun 11, 2010

I'm using perl script from php. I wanted to pass parameters to perl script from php and also return value from perl script to php. I don't no how to do it.

View 14 Replies View Related

Ubuntu Servers :: Script 'echo' During System Startup (runlevel 2)?

Feb 17, 2010

I have created a new script that I am executing at system startup. All was going well until the last step... see below

1. Create script mytestscript.sh
2. Made executable
3. Test script from command line. Works no problem

[code]...

View 8 Replies View Related

Programming :: Implement A System Call For Displaying The System Statistics

Nov 6, 2010

I have been assigned to implement a system call that report the system statistics over all memory which are

Total Pages in Active LRU list
Total Pages in Inactive LRU List

View 1 Replies View Related

General :: $echo Cat Vs $cat Echo / Difference Between Them?

Dec 16, 2010

What is the difference between

$echo cat
$cat echo

View 1 Replies View Related

Fedora :: Pass Drivers From Ubuntu To System?

Oct 7, 2010

I installed fedora on my PC and laptop but no drivers installed especially on laptop

when installed ubuntu all drivers work and installed

my question is
is there is a way to get drivers installation from ubuntu and get it to fedora?

if it possible i will be glade

View 5 Replies View Related

Ubuntu :: C++ - Can't Pass System Output To Variable ?

Sep 8, 2010

I have a line that looks something like this:

Code:

How do i put its output in a variable?

View 9 Replies View Related

Ubuntu :: Adding A Call System To Kernel?

Apr 21, 2010

My ubuntu version is 9.10

I was working on adding a call system to my linux kernel.

I tried a lot of threads and .pdf files which explaining how to add a system call. Like :

1- This thread
2- .pdf file

and many ..

I tried working with linux-2.6.18.1 , 2.6.33.1 , 2.6.28.1 and many many.

But , all of them are returning -1 as result ..

I prefer working on 2.6.28 kernel version or above like 2.6.33.1

View 1 Replies View Related

Ubuntu :: Reset Environmental Variables After Restart The System

Apr 15, 2010

I am new in Using Ubuntu, I need to set up environmental variables in Ubuntu, I do the following:

Code:
export JAVA_HOME=/path/to/Java
export PATH=$JAVA_HOME:$PATH

it work fine, but every time I restart the system I have to reset it again Is that the right way to it, or I do something wrong

View 2 Replies View Related

General :: Pass Several Files Between 2 System Boxes?

Aug 2, 2010

I have to linux boxes (ubuntu 10 and ubuntu 9), both are in the same network - i can do ping between them- so, I need to pass several files between them and i want to do it using the network, i went to nautilus and then smb://192.168.0.1 but i couldn't connect.

my question is:
-how can I do this?
-do I have to do it using samba?

View 4 Replies View Related

Ubuntu :: Bash Script With Variables And Editing Variables

Apr 6, 2011

mkvmerge -o <filename without extension>_TV.mkv -S <filename> && mkvextract tracks <filename> 3:<filename without extension>.*** && perl /home/brian/Desktop/ass2srt.pl <filename without extension>.*** && rm <filename without extension>.***

Doing these commands for multiple command line file inputs is the goal. So I can just type ./script.sh *.mkv in my terminal.This is what I have so far, but it doesn't work whatsoever.

View 2 Replies View Related

Red Hat / Fedora :: Unable To Add System Call

Dec 3, 2010

iam trying to add a system call to the kernel version 2.6.33.7.Iam running fedora 13.I have followed all the steps given in this <hekimian-williams.com/?p=20 -> tutorial,but iam getting a error in make saying undfined reference to mysyscall in syscall_table_32.

View 1 Replies View Related

General :: What Is Signal0 In System Call

Sep 28, 2010

what is what is signal 0 in linux system call ?i can't find that in kill -l signal list . i need to know what is signal 0 . * for examples signal 1 is SIGHUP and signal 2 is SIGINIT . what is signal 0 ?

View 1 Replies View Related

Programming :: Execvp System Call?

Apr 3, 2011

in below program why was new_args[0], rather than the reference the_cmd, passed to the execvp system call?

Code:
/*
A _very_ limited shell program

[code]....

View 2 Replies View Related

Programming :: How To Include Variables In System() Calls

Mar 12, 2010

I need to include variables in a system() call. This is that I have:

[code]#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;

[Code]....

P.S.: I know this is a pointless redundant program, but it's part of a larger project learning process.

View 10 Replies View Related

Fedora Networking :: Set The WPA Pass Phrase With System-config-network?

Jul 14, 2010

I was trying to set my wireless to start up when the computer is booted like the regular ethernet eth0 but I can't figure out how to set the WPA pass phrase with system-config-network

View 2 Replies View Related

Programming :: Python : Pass Output Of System Commands To Variable?

Jan 25, 2011

I'm trying to write a python script that will use the current user's name when interacting. Ex: when started, it should say "hello daweefolk" when I am logged in.
I've tried
Code:
username=os.system("echo $USER")
but the variable remains empty.
What is the correct code?

View 1 Replies View Related

Programming :: Clarification In The Select System Call?

Dec 8, 2010

I have a process that forks, where the childs puts some data of random size and exits while the parent should get the data and does some manipulation.. here I have used a pipe for child to write the data and parent to read the data.. Child simply dumps the data, and the data is of any size even child and parent doesnt know.
I have used select in the parent to see whether there is any data coming on the reading end of the pipe.. if there is a data.. I copy into a buffer.. Im reading the data continusly when the child exits after closing the writing end of pipe. Parent gets blocked on the read part But my question is how parent know the other of pipe is closed when using the select call. In otherwords.. while using select in readfds, how would i know the other end has closed the pipe..

View 2 Replies View Related

General :: The READ System Call In UNIX?

Oct 29, 2010

mplement the read system call in unix...i want the code for read system call...

View 6 Replies View Related

General :: Error While Adding The New System Call?

Jun 9, 2011

I have added a new system call for kernel version Linux 2.6.25-14.fc9.i686. after kernel compilation and running the user mode program i am getting the below error

Error :: Function not implemented
Error number 29

I cannot find the syscall_table.S or entry.S file in the source code , so i didn't made the entry of the syscall in this file, how much necessary the entry of syscall presence in this list and how to get this file?

View 1 Replies View Related

General :: System Call To Know Files And Directories In PWD

Mar 3, 2010

I am searching for any system call similar to "ls" command we use in shell. My requirement is knowing the files and directories in curent working directory and process them based on there type. Here as of now I spawn another procees with system command like system
("sh ls -l | grep ^d | awk '{print $9}'").

Instead of this I want to use any system command where I can capture this information directly into my local character buffer. My opinion is that system calls will not spawn another process as a result less time it takes, another reason is once I use the system command again I need to capture the information to a local file then again read it into local buffer. I want to avoid the file manipulation here.

View 1 Replies View Related

Software :: Want To Change Directory System Call

Apr 14, 2011

I am trying to ptrace a process and when the system call is 'cd' change directory,
the ptrace process is able to trap it by comparing it against "__NR__open" system call. When I try to read the name of the directory from ebx register using peek_data I am getting ".message" and not the directory name.
The same thing works fine when I am tracing a file open system call.

View 1 Replies View Related







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