Software :: Shell Script Super Thread?

Oct 17, 2010

Code:
#!/bin/bash
EXT=(*.flv *.mp* *.mkv)

[code]....

View 13 Replies


ADVERTISEMENT

Ubuntu :: Super Basic Shell Script - Cannot Get Return Line

Jan 24, 2011

I'm trying to create a super simple shell script, but I cant get a return line. The shell script looks like this (only the part that matters)
Code:
yes '' | ssh-keygen
The idea being it will put in a blank char. Then enter until the program finishes. The problem is, it only does the first time, the next 2 times I have to hit enter, it requires me to input it manually (which is exactly what I'm trying to avoid).

The full script (if you care):
Code:
#!/bin/sh
# Created by Omega
# First, program creates RSA key, named id_rsa and id_rsa.pub
# Second, program send the public code to requsted server.
echo 'Removing old id_rsa key (if applicable)'
rm -rf ~/.ssh/id_rsa.pub
rm -rf ~/.ssh/id_rsa
echo "Creating RSA key"
yes '' | ssh-keygen

# Checking if ssh-kkeygen created requested file
if [ -e ~/.ssh/id_rsa.pub ]
then
echo 'Done'
echo 'Username and Server in: me@server format'
read var1
echo 'Port Number? If standard put 22'
read var2
ssh-copy-id -i ~/.ssh/id_rsa.pub "-p $var2 $var"
else
echo ''
echo 'ERROR, ssh-keygen did not execute correctly'
echo 'Retrying...'
echo ''
echo 'Please leave all options default (just press enter)'
ssh-keygen
if [ -e ~/.ssh/id_rsa.pub ]
then
echo 'Done'
echo 'Username and Server in: me@server format'
read var1
echo 'Port Number? If standard put 22'
read var2
ssh-copy-id -i ~/.ssh/id_rsa.pub "-p $var2 $var1"
else
echo 'ERROR, ssh-keygen did not execute correctly'
echo 'Quitting'
exit
fi
fi
# End

View 2 Replies View Related

Programming :: How To Bind Thread To Specific Thread In Multithread Application?

Dec 25, 2010

I am going to use "pthread_setaffinity_np" to bind a thread to a specific core. My application has two threads. I have used mutex to assign a specific id to each thread and then bind that thread to a core different from another core. but it seems that the os assigns both thread to one core.What should I do to bind each thread to a specific core?

View 4 Replies View Related

Ubuntu :: Buttons References - Use The <Super>ButtonX (<Super>Button1 For The Enabled Compiz Screenshot Plugin)?

Jun 5, 2011

how to use the <Super>ButtonX (<Super>Button1 for example for the enabled Compiz Screenshot plugin)? I also notice there is configurable buttons 1 throught 20 under the various options. At first I thought the ButtonX was a mouse button. Maybe it is with some anticipation of there being eventually being a possible 20 buttons on the mouse. I know the Super key is the Key with the Windows logo on it. But I don't know what to do to get the needed Super Key / Button combination. After having enabled Compiz's Screenshot plugin by its default, I don't get an image after hitting any of the Super key and mouse button combinations. I'm running Ubuntu 11.04.

View 2 Replies View Related

Ubuntu :: What And Where Is The Super Key

Jul 16, 2010

Add some pictures inside your Pictures home folder (~/Pictures). Summon Gnome-DO by hitting [Super]and[Space] Type "slideshow", hit [TAB] and select the 'Pictures' folder or another user-defined folder where pictures are stored and finally hit [ENTER] I've Googled the topic (super key) but all I've found is "what," not "where."

View 2 Replies View Related

Programming :: Quickest Way To Get Thread Id

Jun 24, 2010

What is the quickest way to get the thread id(tid) of the current thread in linux? Specifically I use fedora 13. ...and I am talking about inside a C++ program.

View 2 Replies View Related

Programming :: Determine What CPU Thread Is On?

Jul 2, 2010

Is there a library/system call that will return to me what CPU core a thread of execution is running on? I've looked for a bit on the net already and also in /usr/include and couldn't find one.

getcpu() and sched_getcpu() are two that I found, but when I include the appropriate header files (linux/getcpu.h, and sys/sched.h respectively), gcc says getcpu.h doesn't exist and the linker complains it cannot find the implementation in sched.h.

I'm sure I'm doing something really stupid or overthinking...

What I am doing is running an OpenMP application and specifying a list of cpu cores to run on with GOMP_CPU_AFFINITY. I want to make sure that each core is getting the same number of threads.

**UPDATE**

It seems that this code works, but only with glibc >= 2.6, and my machine has 2.5:

Code:
#define _GNU_SOURCE
#include <stdio.h>
#include <utmpx.h>
int main( void )

[Code].....

View 3 Replies View Related

Fedora :: Super / Win Key Is Not Working

Oct 8, 2009

I just installed Fedora 11 on my PC and can't seem to get the Win key to work at all I tried putting entries in xmodmap, tried modifying xorg.conf, and also tried setting altwin:super_win in the config settings. But nothing seems to work. Somehow, my Win key seems to be working as Meta instead of Super. From emacs, if I press Win+x, it works like Meta+x.

View 14 Replies View Related

Ubuntu :: Natty - How To Use The <SUPER> Key

May 2, 2011

I would like that the shortcut <super>+<space> open gnome-do. I set all this in gnome-do already, but everytime I hit the <super> key, the unity menu shows up. I'm using 11.04, 32bit on a lenovo 3000 V200.

View 2 Replies View Related

Debian :: Mark A Thread As Solved?

May 5, 2011

How do you mark a thread as solved?

View 5 Replies View Related

Fedora :: Cannot View Posts To Thread ?

Nov 16, 2010

For some reason I cannot view my own postings to the thread I started here: [url]

I can only view the reply to it by jbuckley2004.

View 2 Replies View Related

OpenSUSE :: Compile QT With Thread Support

Nov 1, 2010

I am trying to install an Open GL screen saver "EulerTop-1.2" and I get the following error message when I run configure - "checking for perl /usr/bin/perl checking for Qt... configure: error: Qt (>= Qt 3.2) (library qt-mt) not found. For more details about this problem, look at the end of config.log. Make sure that you have compiled Qt with thread support!" It appears to be installed -

vance@linux-i4xo:/> rpm -q qt3
qt3-3.3.8b-93.1.x86_64

how does one enable thread support? I have looked around the web but cannot find a solution.

View 9 Replies View Related

OpenSUSE Hardware :: CDs Not Reading, Thread #2?

Jan 7, 2011

Same problem as someone else below- my optical drive will not read CDs in SuSE 11.3 (all the latest patches). CDs read fine in Windows, DVDs fine in both.This is a brand new drive, since my old one gave up the ghost last Tuesday (no longer appeared in BIOS)Drive is Samsung SH-S223L, and dmesg gives the following errors:

[ 64.952304] Buffer I/O error on device sr0, logical block 158968
[ 71.651194] sr 6:0:0:0: [sr0] Unhandled sense code
[ 71.651198] sr 6:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE

[code]....

View 7 Replies View Related

Ubuntu :: When Does The POSIX Thread Start

Feb 3, 2010

i'm trying to understand the POSIX threads and i can't understand when does the thread start: does it start when i do

pthread_create()
or when i do
pthread_join()

or maybe i'm missing something. i do understand that pthread_join() causes the calling thread to wait till the called thread is finished.

View 2 Replies View Related

Ubuntu :: Test - How To Delete Thread

Jan 6, 2011

Just a test, how to delete the thread...

View 3 Replies View Related

Ubuntu Installation :: Looking For A Grub2 Thread?

Feb 10, 2011

i know i should look more through the forum, but i've been stuck on installing ubuntu on my computer for 3 days now, reinstalling, manual grub installing and so on, but no go. but i found a good thread on my still no fully functional ubuntu computer that explained very well for a complete linux noob how to install grub2 on ubuntu via the livecd. but since i was booting from the live cd meant that i couldn't bookmark it, and very little on this forum, as far as i can see, gets sticky, makes it very hard to find.

the basic problem is, i completly reinstalled ubuntu 10.10, and the bootloader (that i now know is named grub2) could not be installed. so i've found several guides, including the wiki, but it haven't really worked. now instead of explaining all of this over again, like all of you have probably done a million times, can you just post the most informative links here, so i can pick and choose,

View 9 Replies View Related

Ubuntu :: Marking A Thread As Solved?

Apr 21, 2011

I have a few Threads that have been solved but I do not know how to add that Prefix. How do I change that on an existing thread.

View 3 Replies View Related

Ubuntu :: Mark My Thread As Solved?

May 25, 2011

My problem has been solved in another thread but I cannot figure out how to mark it as solved.
How do I do this?

View 3 Replies View Related

Programming :: Thread Scheduling And Signalling

Mar 23, 2010

I have a program which is uses sigaction to register for a SIGIO signal (for incoming data on a fd) with an appropriate event handler. I also create a new detached thread 'B' that does some work with the received data. Normally the thread B runs properly. But when my event handler is called (because a there is new incoming data), after the event is handled, the thread B is not called immediately. There is a noticeable delay of the order of many seconds before it is scheduled again .During this delay, my program is doing nothing.

What am i doing wrong? Is there someway i can run thread B as soon as the event is handled (and assuming no other work is to be carried out)?

View 3 Replies View Related

Networking :: Use Static Thread Handlers ?

Jun 29, 2010

Can we use static thread handlers ?

View 1 Replies View Related

General :: How To Make A Runnable Thread?

Feb 11, 2011

I wrote a code .sh I want to make it a runnable thread.
Q1: How can I do that in Ununtu?

Q2: I put that file (x.sh) in the "Auto start" program.I choose start at "start up" but it open the code editor page.I want it to be run behind backgroun...Have I convert it to .exe firstly ?!

View 17 Replies View Related

General :: Make A Thread With A Poll?

Feb 25, 2010

Is there a way for members to make a thread with a poll? I've looked around and havent found how, but thought it is around here somewhere.

View 2 Replies View Related

Programming :: Close The Thread Externally?

Aug 11, 2010

i created one thread in main(). I have while in thread function.

I want close the thread in main after some time. How can i close it.

View 4 Replies View Related

Programming :: How To Make Thread Nicer?

Feb 16, 2010

Kernel: 2.6.24.2
System: Embedded System

I have a process and two threads running in it. Thread1 is my GUI-Thread (using FLTK) and Thread2 is running at the first 10 sec. after start.Now, I would like to make Thread2 "nicer" to Thread1, because otherwise GUI stucks sometimes. But I didn't find a solution.Is it possible to define the "niceness" of threads inside a process (to each other)? And if so, how do I have to do this?

View 2 Replies View Related

Programming :: Passing Data To A New Thread?

Feb 11, 2011

I have to launch a new thread from my existing main program and pass data to it.
For now the data is simply a string value.

How I go about passing data to a new thread while it is running.

View 5 Replies View Related

Programming :: Thread Stack Using Pthread_attr_setstackaddr()?

Sep 22, 2010

When I set the stack base address of the child thread using the POSIX library function "pthread_attr_setstackaddr()", I am unable to access the memory contents of its parent. The data-structures that are created on the HEAP of its parent using malloc() are either getting destroyed or unaccessible when moving to the context of the child thread. These data-structures are being passed as an argument to the child thread.Even if I make these variables global then also it is not working.pthread_attr_setstacksize(tattr, ...);stackbase = (void *) malloc(...);pthread_attr_setstackaddr(tattr, stackbase);But when I create the child thread without setting its stack base address using that pthread_attr_setstackaddr(), then it is able to access the parent's memory contents.

View 1 Replies View Related

OpenSUSE :: 11.2 Freezes With Super Button?

May 21, 2010

I've been Linux-only for several years, and (finally!) installed Suse 11.2; AMD 64-bit, 3Gb RAM.I'm getting random freezes, after I've pressed the Super (Windows) button; screen still visible, mouse pointer moves, but nothing happens, I have to restart. Really frustrating; it's my major complaint, otherwise 11.2 looks good.: I use super+scroll button for desktop zoom in Mint with no problem at all.

View 2 Replies View Related

Ubuntu :: Unable To Log In As A Super User?

Apr 22, 2010

Recently I installed Ubuntu using WUBI. During installation it asked for a user name and password which I filled in. That user name and password are the same that I now use to log into ubuntu. But now I am unable to log into super user using the terminal. When I try to log in to the super user account it says that the password is wrong. During the whole installation process only once did wubi ask me to enter password and I am using the same password. My windows user name and password are the same as what I entered during installation.

View 3 Replies View Related

Ubuntu Installation :: Upgrade Super OS To 10.4

Apr 30, 2010

Can I upgrade Super OS to 10.4 or should I wait until there is a specific Super OS 10.4 made?

View 1 Replies View Related

Ubuntu :: Can't Get Super Key Assigned To Left Win?

May 4, 2010

I've been working on this for a couple days, but I cannot seem to find a solution either on my own or through trusty Google. For whatever reason, I cannot get the Super key assigned to the Left Win as I have had it in the past. There does not seem to be an option to do that in the Keyboard layout thingy.

View 4 Replies View Related







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