Debian Programming :: How To Simulate Script Execution

Aug 7, 2015

I'm trying to save the output of the script I wanna run but for some reason I cant manage to do it with "script.sh > Output_4.txt"

The thing is that the script was already run and it extracted some directories so when I try to run it again (to save the log to a Output_4.txt) bash says (see screen-capture) and of course the log's empty!!!!

View 2 Replies


ADVERTISEMENT

Programming :: Simulate Unix Kernel In C++ ?

Jun 2, 2010

How simulate unix kernel in c++..or give me a link....

View 2 Replies View Related

Programming :: Simulate Key Strokes Events In Other Processes In System?

Feb 3, 2011

I have a program that receive user input.
I want to run this program automatically without user interaction, and in order to do that I need to simulate key events.
How can I do such a thing?

The program I am running is partly java and partly shell.

The shell part is easily done by using:
./prog.sh <parameters (Parameters being a file containing parameters)
But the java doesn't work similarly.

View 7 Replies View Related

Programming :: Simulate Dijsktra's Algorithm Using Network Animator Of Ns2?

May 3, 2011

I need to simulate dijsktra's algorithm using network animator of ns2. how to write a tcl script for my code. This tcl script runs the dijsktra code and simulates its running on network animator.

View 1 Replies View Related

Programming :: Simulate A Serial Protocol In User Space Program To Test Reception Algorithm?

Jul 28, 2010

I want to simulate a serial protocol in user space program to test reception algorithm. The protocol is similar to UART protocol but frame format is different. The duration of 1 bit is 114,46 us. In my main function I'm creating two threads. Tx for simulating transmitting data and Rx for reception data. For measure time I use create_timer() function and signals. Each thread has its own timer and signal handler. Tx timer uses SIGUSR1 and Rx timer uses SIGUSR2. Tx thread sets the global variable and Rx reads it.

The timers are set to sample with 114,46 us period. When they reach this value signal handler should set the flag. Flag is check in thread and some operation are made. When I set the timers period for longer time (100 ms) everything works fine but when I change it to default value (114,46 us) the Rx thread doesn't receive the proper data. I am wondering if the 114,46 timer period is possible to simulate in user space? Whether the time will give me the proper resolution ? Theoretically it should provide 1 ns resolution.

View 3 Replies View Related

Debian Multimedia :: How To Simulate The Enter Key In X Windows

Dec 16, 2014

When I drink tea, the water splashed on my keyboard. It didn't cause any problems until a few mins ago. Now my Enter and right hand side shift key don't function any more (The new line in this text is copied from other thread).

So I would like to know how can I simulate an enter key press so that e.g. a command can be executed in terminal. Because I have some source code uncommitted, I want them at least get committed first.

View 2 Replies View Related

Programming :: Substituting Variable Upon Cat Execution?

Mar 30, 2010

I have a file named "test.txt". It contains the following:

Hello $USER1
Your boss is $ADMIN1

Now, I want to do something like this:

export USER1="World"
export ADMIN1="Me"
cat test.txt > test2.txt

And achieve something like this when I view the contents of test2.txt:

Hello World
Your boss is Me

The problem is, it's not that easy to achieve. I don't want to do the "echo Hello $USER1 >> test2.txt" because I'm planning to implement this on a MB-sized text file.

View 5 Replies View Related

Programming :: Allocate Memory To A Program Before Execution?

Jan 3, 2011

I went to an interview last week and there was this guy who asked a simple question that i have been trying to solve for a couple of days. I tried google but i just cant get the search keywords right. The result were just useless. Well, the question is : "How can we allocate a limited memory to a process before we start its execution" well, the question is related to an X11 system so may be some flags must be set to limit its memory.

View 9 Replies View Related

Programming :: Restart The Program Execution - Java

May 3, 2011

In gui validation if user enters string in integer requiring field, a dialog box pops out. So on clicking the button i want to stop the program execution and return to the previous jframe(either the same one or newly created object of it).

How can i handle this in java.
I tried calling main(); but it doesn't work.
Also System.exit(0); doensn't work.

View 1 Replies View Related

Programming :: Skip Execution Of A Function In A Script?

Mar 15, 2011

I have a bash script which is composed of different functions.I want to able to select which functions to be executed when i run the script, for that i thought about using a flag in the function. but i dont know how to skip the function whose flag is set to zero.

Code:

myfunc1(){
local flag=1
commands
{

[code]....

View 2 Replies View Related

Programming :: Understanding Oracle Execution Plans?

Mar 30, 2010

As part of my job I often have to write queries in Oracle (10g) and I am experienced enough to see where I should be using an index where possible etc. Most of the time I just let the CBO come up with the best plan however sometimes it obviously doesn't!Now, I know in general that full scans of large tables aren't good however I don't fully understand an execution plan - ie, I could not look at a complex piece of code, look at it's plan and say "oh, the reason that is performing badly there is because the SBO has chosen to use nested loops rather than a hash join, so if I hint it then it will run quicker!" - this ultimately is where I'm trying to get to

View 2 Replies View Related

Programming :: Control Execution Of Programs In A Shell Script?

Apr 27, 2010

Do you know how to write a shell script that executes say 4 instances of the same program in different directories at the same time, and once ONE instance completes it executes a new instance of that program in a new directoryd so on, until 100 instances have been executed, each in their own directory

View 5 Replies View Related

Programming :: PID Retrieval In Tcl / Retrieve The Pid Of The Process (execution Using Framework)?

Jul 13, 2010

I have a test framework written in tcl which i run for 5-6 hours.Now i want to retrieve the pid of the process (execution using framework) as first few line of the script and do some processing.

How this PID retrieval is possible in tcl?

View 1 Replies View Related

Programming :: Continue Execution Of A Python Program While A Background Task Is Going On?

Aug 28, 2010

I'm trying to figure out how to continue execution of a Python program while a background task is going on.

In bash, it is adding "&" to the end as in:

Code:
#! /bin/bash
find / -iname "*.py" > /tmp/all_pys &
echo "looking for all python scripts and putting them in /tmp/all_pys"
(yes, I know I could just put the echo BEFORE the find but I just use it for example)

Say I do that in python (not necessarily running the shell, but perhaps using scriptutil.ffind or something similar), but want to allow the user to be doing something else while running that search in the background, how would I thread, fork, subprocess (not to be confused with the module and Popen) [or whatever I should call it] that?

View 14 Replies View Related

Debian :: Bashrc Execution On Startup

Aug 11, 2015

I'm not sure if this is a Debian-specific question or a KDE question.

FYI:
uname -a
Linux DESKTOP 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) i686 GNU/Linux

(Running KDE).

Question:
Upon logging in (typically, for the first time each day) I would like to see a console window/shell or a simple terminal-emulator/shell automatically open up.

The reason is: In order to get my .bashrc to execute I have to log-in, then bring up an xterm or some other terminal-emulator.

Background: My .bashrc has a once-per-day routine/section that will set up my desktop to look the way I want it on my initial log-in (primarily with my Java applications up/running and displayed and waiting for me).

Then, later on that day whenever I bring up new bash shells, my .bashrc is executed but that once-per-day routine/section is no longer executed.

View 5 Replies View Related

Debian :: Where To Retrieve The Execution Path And How To Troubleshoot The Cron

Dec 1, 2010

I'm testing on a VM version in debian LAMP with CGI / FastCGI enabled. My goal is to run a PHP script via cron, unfortunately I can not run it .. I don't understand if I'm using a wrong path for the execution of API CGI or I get lost in the syntax ...

here is my cron:

H # m Sun mon dow command
10 * * * * * / etc/php5/cgi / var / www / import / import.php? Mode = P

where to retrieve the execution path and how to troubleshoot the cron ?

View 1 Replies View Related

Debian :: Starting Deferred Execution Scheduler: Atd Failed

Mar 20, 2011

When I boot , I find a line: starting deferred execution scheduler: atd failed. How to do with it? I use Debian 6.

View 1 Replies View Related

Debian Configuration :: Change The Automatic Fsck Execution At Boot Time To Be Above 30 Boots?

Aug 27, 2010

How can I change the automatic fsck execution at boot time to be above 30 boots? I reboot the system sometimes 3 to 4 times a day. Intel 3 GHz, tower, i386 lenny vmlinuz-2.6.31-686

View 2 Replies View Related

Fedora :: How To Simulate A Webcam

Mar 27, 2010

I do not have a webcam yet, but would like to set certain video files I have to be played as my 'streaming video content' from a 'virtual' webcam.

View 6 Replies View Related

Fedora :: New Update - Could Not Do Simulate

Jun 26, 2010

Could not do simulate: nautilus-sendto-2.28.4-1.fc13.i686 requires libedataserver-1.2.so.11
gnome-panel-2.30.0-1.fc13.i686 requires libedataserver-1.2.so.11
empathy-2.30.1.1-1.fc13.i686 requires libedataserver-1.2.so.11 : Success - empty transaction

View 14 Replies View Related

Fedora :: Add / Remove Software - Could Not Do Simulate

Sep 2, 2010

How to get rid of the following error I've been receiving from Yum. I'm fairly new to Fedora. The following message appears when Add/Remove Software is launched. It also pops up periodically in the notification window.

could not do simulate: Traceback (most recent call last):
File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 3270, in __init__
self.repos.confirm_func = self._repo_gpg_confirm
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 823, in <lambda>
repos = property(fget=lambda self: self._getRepos(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 551, in _getRepos
prerepoconf = self.prerepoconf
AttributeError: 'PackageKitYumBase' object has no attribute 'prerepoconf'

View 1 Replies View Related

Networking :: Simulate Mobile Agents With NS2?

Jan 7, 2011

how to simulate mobile agents with NS2 (docs , code ......)

View 2 Replies View Related

Software :: Simulate Serial Device With Pty's ?

Sep 21, 2009

I wrote software which access and reads a serial device. I would like to test this software on my computer without loop-wiring or without a second computer.

How could I use pty's to simulate a serial device?

Actually I would like to temporary replace the /dev/ttyS1 file by one end of the pty. How could I do this? Is there a command to create a pty pair?

View 4 Replies View Related

Fedora Servers :: Simulate A VH Through A Localhost With A Dynamic IP?

Nov 16, 2010

For backup and pre-functionality purposes, I need to simulate a VirtualHost in my Fedora (14) machine. I found some interesting links to carry out that process but with an IP fix.So, how can I simulate a VH through a localhost with a dynamic IP?

View 2 Replies View Related

General :: Simulate Ack By Using Grep With The Right Combination Of Options?

Aug 25, 2011

I have ack-grep installed on my local machine, and find it indispensable for quickly 'acking' through a codebase when debugging. However, on my cheap shared hosting, there is no ack-grep. One of the testimonials on betterthangrep.com mentions a

Rube Goldberg mess of find/grep/xargs which sounds like what I need, but coming from the opposite direction.

View 2 Replies View Related

Ubuntu :: Simulate Bad Block Or Sector On Drive?

Feb 15, 2010

I want to simulate a bad block or sector on a drive or even a virtual drive image to test my data recovery distro. I wish I would have bookmarked when I read about it before. It was some type of low level command, I remember something about scsi subsystem or kernel thingabob.

View 3 Replies View Related

Ubuntu :: Simulate Keypress Via Keyboard Shortcut?

Feb 21, 2011

I have a G15v1. After going through hoops and loops to get it working only to discover that you only needed to install g15daemon through the Ubuntu Software Center, I found myself with one big problem. I migrated from windows just now, and there, I had my macro keys(the extra ones) bound to CTRL+W, CTRL+T and to a simulated mouse-wheel scroll so I could navigate the web more easily. How would I go about doing that? I figured, if I used the System->Preferences->Keyboard Shortcuts thingy and bound my key, in my case XF86Launch5, to a command similar to "simulate keypress CTRL+W"(I know it's totally wrong, just to give you an idea), I might be able to get it working again. Only problem is, I can't find anything like that. Any of you has any clue about it? I googled but I only find C++/Java/coding related results, which are not exactly what I need to do.

View 4 Replies View Related

Hardware :: Simulate Unplug And Replug Of USB Devices?

Jul 1, 2010

After some tests I found that some USB Bluetooth Dongles errors, only are recoverable if the USB is unplugged an then plugged again. Is there some way to simulate that a USB device is unplugged and re-plugged?

View 5 Replies View Related

Networking :: Simulate A 500Mbps Link On A 1000Mbps?

Mar 31, 2010

I need to simulate a 500Mbps link with a 100ms delay and a loss probability of 0.0001% on an ethernet link between two gigabit ethernet cards...I tryed to use these commands:

# tc qdisc add dev lo root handle 1:0 netem delay 100ms loss 0.0001
# tc qdisc add dev lo parent 1:1 handle 10: tbf rate 500Mbit buffer XXXX limit YYYYY

But during some simulation throughputs are very low ( 190Kbps....210Kbps....) for different values of XXXX and YYYY.... (I don't want that the loss probability is caused by the buffer and the limit value but only by the loss probability setted on netem...)

View 2 Replies View Related

Software :: Simulate Cron With Screen Manager?

Nov 10, 2010

I can't use cron on server. But on the same server i can use screen. Is there any way (any program) to run something like cron in the screen session? Or any solution for that problem.

View 3 Replies View Related







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