Hello,
Can you please suggest me the syntax for doing floating point comparison in shell script. I am using bash.
I would ideally like to use as part of if statement
here is a small code snippet :
key1="12.3"
result="12.2"
if (( $result <= $key1 ))
then
# some code here
fi
thanks
Kiran
...
In my C program I want to know if my executable is run in foreground like this
$./a.out
or like this
$./a.out &
...
I would to introduce multithreading feature in my shell script.
I have a script which calls the function read_cfg() with different arguments.
Each of these function calls are independent.
Would it be possible to instantiate these function calls (not scripts) parallelly.
Please let me how can we achieve that.. ?
...
Can anybody confirm if by setting the the following env variables under debian lenny will make previous history entries not to be saved. GNU bash, version 3.2.39(1)-release
export HISTCONTROL=ignoreboth
export HISTSIZE=500
I have added them to my /etc/bash.bashrc but I keep getting repeated commands.
Thanks
...
I know with .NET we can host wcf service from a console application without the need of webservers like IIS or apache. Is it possible to do the same with Mono 2.6.1 on a RHEL 5 or CentOS? Any links to any documentation will be highly helpful.
...
I'm having trouble getting a sample program to link correctly (in this case against the ICU library). When I do 'make', everything builds fine. But when I run it, it says it can't find one of the .so's. I double checked they're all installed in /usr/local/lib. What I discovered was it was looking in /usr/lib. If I symlink from there to t...
The actual situation is a bit complicated, but the issue I'm running into is that I have an echo command within an eval command. Like so:
$ eval echo 'keep my spacing'
keep my spacing
$ echo 'keep my spacing'
keep my spacing
I was wondering how I could keep eval from stripping my spacing so that the first command pri...
How can I insert a video clip into a presentation created in Lyx?
Have seen http://www.latex-community.org/forum/viewtopic.php?f=19&t=48. It works, but there the video starts in the background in an external player.
I would prefer it to be played in the presentation itself. If an external player is used it it should at least start ...
Hi!
The problem is: How to access x,y,z coordinates of my touchpad?
Now that SHMConfig is disabled by default, I've found out that, in order to do it, I need to access a file from /dev/input/. Those files are, sadly, readable by root only. Is there any way to access the touchpad while in user-mode?
...
I compiled python 2.6.4 for centos 5.3 and find this issue that os.path.getmtime() or os.stat().m_time doesn't have the fraction part. As per docs, if os.stat_float_times() returns True, then it should return float value. In my case, I do see it as float, but no fraction part (it is 0).
In [3]: os.path.getmtime('/tmp')
Out[3]: 12683391...
I'm using find for a task and I noticed that when I do something like this:
find `pwd` -name "file.ext" -exec echo $(dirname {}) \;
it will give you dots only for each match. When you s/dirname/basename in that command you get the full pathnames. Am I screwing something up here or is this expected behavior? I'm used to basename givin...
Hello,
In addition to my previous query concerning multi-threading in shell scripting
I am curious if its possible to have multiple progress bar.
Here is a code snippet of my expected result :
Output : 1 of 100 Files Completed # Thread1
Output : 10 of 45 files Completed # Thread 2
The lines are updated showing the progre...
Greetings,
I've got a directory with a list of pdfs in it:
file1.pdf, file2.pdf, morestuff.pdf ... etc.
I want to convert these pdfs to pngs, ie
file1.png, file2.png, morestuff.png ... etc.
The basic command is,
convert from to,
But I'm having trouble getting convert to rename to the same file name. The obvious 'I wish it work...
mono : Is remote debugging possible with monodevelop? I want to remote debug a console application running on a remote RHEL server with monodevelop installed on CentOS development machine. Is this possible with monodevelop?
...
I am thinking of a simple Java appplication (command line) that connects to the internet to download a XML file, the problem is that my Ubuntu is using a proxy to connect to internet with username and password (through http_proxy ="http://<username>:<pwd>@<ip>:<port>" ). So my question is, could it be possible to ...
Hi People,
Is Linux Kernel scheduler a part of init process? My understanding is that it is part of Kernel threads managed internally not visible to user by either top or ps. Please correct my understanding.
Is it possible to view standard kernel threads through any kernel debugger to see how standard threads occupy cpu activity?
-Kar...
I have two questions:
How to simulate touch event in linux.
How to work with multitouch on Qt in Linux.
...
Is there any way to determine s/n of usb-drive in linux using C++ ?
If not C++ is there any other way different from hwinfo -disk and hdparm -i ?
...
I'm trying to set up the android SDK to develop a simple program on the command line in linux (Ubuntun 9.10). I tried eclipse, but it has know problems running on Ubuntu, so I gave up on it. Here's what I've done so far:
downloaded android-sdk_r05-linux_86.tgz from http://developer.android.com/sdk/index.html
tar xvzf android-sdk_r0...
Hi all, how can I set the mouse cursor position in an X window using a C program under Linux?
thanks :)
(like setcursorpos() in WIN)
EDIT:
I've tried this code, but doesn't work:
#include <curses.h>
main(){
move(100, 100);
refresh();
}
...