General :: Write Script To Use Function And Still Keep Function Active?

Feb 21, 2010

the function terminates if no key is pressed for 10 consecutive seconds. I tried using the -t option as suggested in some forums, but my version of showkey doesn't have the option of changing the timeout. The options I get are:

-h --helpdisplay this help text
-a --asciidisplay the decimal/octal/hex values of the keys
-s --scancodesdisplay only the raw scan-codes
-k --keycodesdisplay only the interpreted keycodes (default).

Is it possible to write a script to use this function and still keep the function active until an interrupt is recieved?

View 6 Replies


ADVERTISEMENT

General :: Write A Telnet Server Without Username/password Function

Sep 24, 2010

i am trying to write a telnet server without username/password function. how to implement such function? the source code from inetutils seems complicated..

View 8 Replies View Related

OpenSUSE Hardware :: Multi-function Epson Stylus Sx218 - Can Not Run The Scanner Function ?

Mar 24, 2011

I bought a multifunction stylus sx218 Espon model and I can not run the scanner function. I did some research and found a few solutions and very functional. I hope someone solves the problem. My version of openSUSE 11.2.

View 9 Replies View Related

Programming :: How Can A Friend Function Access A Public Function From A Base Class

Nov 16, 2010

Code:
#include <iostream>
using namespace std;

[code]...

View 1 Replies View Related

Programming :: Passing Data From Interrupt Handler Function To Tasklet Function?

May 18, 2010

I am doing some Linux kernel programming for my research project. I need to record the timestamp (by using cpuid and rdtsc) when an interrupt handler (top half) is first invoked. Due to the time critical nature of the problem itself, I have to do the timestamping inside the interrupt handler itself (the first operation when the handler is called). However, I understand that tasks that are not so time critical should be deferred to a tasklet function (bottom half) for processing because other interrupts are disabled in a (top-half) interrupt handler. I am currently out of idea on how I can pass the timestamp information that I have obtained in the interrupt handler to the corresponding tasklet function.

View 2 Replies View Related

OpenSUSE :: Get Function Set_magic_quotes_runtime() To Function On The Newer Versions?

Mar 30, 2011

I'm currently using OpenSuse 11.1 web server. This is bad since 11.1 is no longer supported. the reason why I am using it is because Function set_magic_quotes_runtime() was no longer being used. (so I was told)

That being said, is there a way to get Function set_magic_quotes_runtime() to function on the newer versions of OpenSuSE?

View 9 Replies View Related

Programming :: How To Write / Use Function

May 30, 2010

Can you offer me the code about fmod() in C. I want to know how this function work, i am very interested in it because i have no idea to implement it, i want to know... how to write the function... not 'how to use the function' can anyone post the source codes of this function here?

View 6 Replies View Related

Programming :: Write A Function In A Shell Script?

Sep 22, 2010

I need a help regarding writing a function in a shell, what exactly a function does!!

View 3 Replies View Related

Programming :: Write A Function That Shall Execute Periodic?

Sep 1, 2010

I want to write a function that shall execute periodic. means if i set time 1 sec that function should execute in each 1 sec. let us call that function func1. But i dnt want to wait inside the func1 for that 1 sec. Meanwhile i want to run another function say func2 in background . some thing like less priority function. Whnever the time come to execute the periodic function func1 it has to go to func1 and then again in the waiting time , the second function func2 will resume. I wanted to know how to do it.. Can somebody tell me is it possible using signal in linux.

View 6 Replies View Related

General :: Write A Shell Script Instead Of Shell Function?

Apr 27, 2011

I would like know when it is necessary or advisable to write a shell script instead of shell function ?

View 3 Replies View Related

Software :: In Platform \ Use Ioctl Function To Read/write Data To Hid Device?

Jun 24, 2011

Now i have a problem.I want to used a hid usb device under linux 2.6.11.But i can't know how to used ioctl function to send and receive data to a hid device

View 3 Replies View Related

Programming :: Bash Array Add Function Example Using Indirect Array Reference As Function Argument?

Jun 20, 2010

I looked on the net for such function or example and didin't find anything, thus after having made one i guess it would be legitimate to drop it to see what others thinks of it.

#!/bin/bash
addelementtoarray()
{
local arrayname=$1

[code]....

View 10 Replies View Related

Programming :: Write A Function That Counts The Number Of Occurrences Of A Pair Of Letters In A String?

Sep 9, 2010

Some help with this problem:Code:Write a function that counts the number of occurrences of a pair of letters in a string

View 13 Replies View Related

Programming :: Write Some Code That Involves Creating A Function To Return A Vector Iterator?

Jan 21, 2011

I'm trying to write some code that involves creating a function to return a vector iterator.I'm not sure what is wrong.

Code:
template <typename T> class VectorTemplate
{

[code]....

View 4 Replies View Related

Programming :: Declaring A Function In A Function - C Programming

May 24, 2010

I want to declare a function in a function, but had no success till now, see the error code below and visit the project at sourceforge

[Code]...

View 14 Replies View Related

General :: Use Own Function Instead Of Kernel One?

Mar 29, 2010

I am developing a function say my_abc() which does the same thing as kernel function abc(). Now I want that instead of using predefined kernel function kernel starts using my function. It might be possible that the kernel function has been used so many places.

View 7 Replies View Related

General :: Unset Or Get Rid Of A Bash Function?

Jun 19, 2010

If you set or export an environment variable in bash, you can unset it. If you set an alias in bash, you can unalias it. But there doesn't seem to be an unfunction.

Consider this (trivial) bash function, for example, set in a .bash_aliases file and read at shell initialization.

function foo () { echo "bar" ; }

How can I clear this function definition from my current shell? (Changing the initialization files or restarting the shell doesn't count.)

View 1 Replies View Related

General :: Pass All Arguments To A Function?

Jul 6, 2010

I've got a sticky little problem with a bash script. Please consider the following code:

Code:
#! /bin/bash
processArgs() {
echo "Count = $#"
while [[ $# -ne 0 ]]; do
echo $1
shift
done
}

processArgs $* If I call this script with Code: ./script first second third it'll print each of the argument on a new line - exactly what I would expect. However if I call it with

Code: ./script "Single Argument" "Second-Argument" it splits the first argument in two using the space as a delimitor. The problem appears to be the call to processArgs, where $* doesn't honour the quotes around the variables sent to the script.

View 4 Replies View Related

General :: Echo Function In .bashrc?

Feb 25, 2010

I'd like a function in my .bashrc file that would allow me to pass text to it and echo the text to a specified file. I know it's simple as "echo 'text' >> file," but ideally, I would want to alias the function so I execute something like:

Code:
user~ $ write 'this is a test' with "write" being the function, and 'this is a test' being echoed to the file. I hope I explained that well enough.

View 3 Replies View Related

General :: Function To Delete A Folder?

Dec 23, 2010

Is there any function to delete a folder which has few files in it ?I tried rimdir() bit it can only delete empty folders; unlink() can not delete directory entries. any other function ?

View 7 Replies View Related

General :: Just Use Dumpfile Function Of Libpcap?

Jul 15, 2010

These days i try make a simple sniffer for a embedded system. and it need the function of dump all the packets into a file, which can be read by wireshark..etc. First i copy a code called simplesniffer.c from the Internet,and and now I want to add the dumpfile funtion to it. i find some problems.Quote:

/* Come from ---- http://blog.chinaunix.net/u/24474/showart_226419.html */
/* simplesniffer.c */
#include <stdio.h>

[code]...

View 2 Replies View Related

General :: Replacement For Clrscr() Function?

Jan 21, 2011

i have been using turbo C for a while to do programing . can u plz let me know the replacement for clrscr() function in linux

View 1 Replies View Related

General :: What Is The Function Of Resize2fs Command

Jun 23, 2011

what is the function of resize2fs command and how this command works internally , how it is related to inodenumber or does it format the partition

View 6 Replies View Related

General :: Pass A Variable To A Function That Already Being Escaped?

Jul 28, 2010

What i want to do is create multiple informix sql statements & later run them via a bash script.

Here is what i have so far (this works) but is meant to be run from a cron job so it only does one day at a time:

echo "
update hst`date --date='yesterday' +%m%d%y`
set x = 'GARP'
where y in ('CRE', 'LAC', 'SRL', 'JAG', 'JNM', 'BIM')
and appl = '';

[Code].....

The problem here is it doesnt want to read the variable $x correctly so the statement fails.

View 1 Replies View Related

General :: Function Of Netstat -a Terminal Command?

Jan 26, 2011

I had a dream least night in which I was on my computer and I was typing the command Netstat -a in command prompt in Ms-Dos. And I was wondering why it looks so much like a Linux terminal command? This question persisted in my mind after I woke up. So what is the story about it?

View 3 Replies View Related

General :: Error In Unzipping Using System Function

Jul 23, 2010

I have to unzip only files in zipped folder in current directory by c program. For that I am using system() function. This function returns zero.

when I write system("unzip -jo /storage/conf.zip") but folder will not be unzipped. Same will be successful if tried on command line.

View 1 Replies View Related

General :: Putting Function Key Chars In A File?

Sep 18, 2010

Years ago on AIX I used to create a file of key strokes, including function keys (mainly F3 and F12) into a file, and used that file as input to an INFORMIX program, to automated tasks, something like this:
fglgo myprogram.fgo <keystrokefile.txt

Now, I'm using Aubit language on GNU/Linux, and I'd like to do the same kind of thing, but I can't recall how I worked out the chars for the function keys, I'm using a different emulation (xterm), and I can't work out what characters to put in the key stroke file. My $TERM variable contains "xterm". If I type "infocmp", I get this:

Code:
# Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm
xterm|xterm terminal emulator (X Window System),
am, bce, km, mc5i, mir, msgr, npc, xenl,
colors#8, cols#80, it#8, lines#24, pairs#64,
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,

[Code]....

1. Is the above infocmp output the place I should get the information I need?

2. What chars do I need to put into my file to simulate me pressing F3 and F12?

3. Is there a way for me to put such chars in a file by just pressing those function keys (I tried a here document, but that doesn't work (it's as if the function keys are not even pressed)).

View 5 Replies View Related

General :: Tell What Number '2' Refers To In Function Calls?

Apr 29, 2010

Can someone tell me what the number '2' refers to in function calls, for example fork(2).

View 3 Replies View Related

General :: Stop A Function Called In A Script?

Sep 30, 2010

I made the following script:

Code:
#!/bin/bash
logErrors(){exec 2>/tmp/errorlogfifowhile truedocat /tmp/errorlogfifo |echo $(date "+[%Y-%m-%d %H:%m:%S]") Error: >/var/log/error.logdone}
logErrors
ls inexistentFile
exit 0

If I execute the script I see the formated error message in /var/log/error.log, as to be expected. After the script execution, I hoped "logErrors" was not executing anymore, but when, in another terminal, I call "echo something > /tmp/errorlogfifo", I still see the formated error message "something" in "/var/log/error.log". How can I finalize "logErrors" before the script ends? Or, maybe someone knows a better way to format and log the erros in a script.

I forgot to say that the file "/tmp/errorlogfifo" is a named pipe created by the command "mkfifo /tmp/errorlogfifo".

View 8 Replies View Related

General :: What Is The Function Of Createrepo - Command While Installing Yum

Jan 16, 2011

I m using Redhat linux 5.1, I want to know what is the function of 'createrepo .' command while installing yum.

View 1 Replies View Related







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