10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
2. Shell Programming and Scripting
I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found"
My code is as follows:
--------------------------
#!/bin/sh
user="test"
DIR="/bldtmp/"$user
VIEW="test.view1"
echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies
3. UNIX for Dummies Questions & Answers
There must be a command line utility to convert metric -> us, mm to inches etc, but I don't remember seeing it. Any suggestions? Anything in the repositories? Thx. (4 Replies)
Discussion started by: koodawg
4 Replies
4. Programming
I'd like to write a program (I'm flexible on language; C/C++ was my original idea but a scripting language would probably be better) that runs hundreds of programs, but only N = 4 (say) at a time. The idea is to keep all the cores on a multicore machine busy.
How can I do this? In particular,... (6 Replies)
Discussion started by: CRGreathouse
6 Replies
5. UNIX for Advanced & Expert Users
hi all,
i am using pthreads.
What will happen if a thread does a fork?
will all the threads are duplicated for the new process or only the called thread is duplicated?
are the resources shared across the processes?
thank you (0 Replies)
Discussion started by: skyrulz
0 Replies
6. Shell Programming and Scripting
I'm trying to populate a command line into a variable. It appears to be executing, instead. Here's an example:
mycmd=''
if ...; then
$mycmd='sudo '
fi
$mycmd=$mycmd 'sed -i prev s/aaa/bbb/' $myfile
res=`$mycmd`
(I'm also not sure of the best way to execute the command from the... (1 Reply)
Discussion started by: littlejon
1 Replies
7. Programming
hello,
here I am copying my code...
I am using two threads for reading and writing at com ports....one for reading and one for writing...in read thread I am using select() api....and polling again and again if there is some data to be read....but select is not returning any positive value so... (0 Replies)
Discussion started by: arunchaudhary19
0 Replies
8. Linux
hello,
here I am copying my code...
I am using two threads for reading and writing at com ports....one for reading and one for writing...in read thread I am using select() api....and polling again and again if there is some data to be read....but select is not returning any positive value so... (0 Replies)
Discussion started by: arunchaudhary19
0 Replies
9. UNIX for Dummies Questions & Answers
Hi Group ,
I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages.
- i m writing
>write user-id
! ls
o
ctrl-d
inspite of executing the command ls,other terminal shows ! ls.
Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies
10. Programming
In Tru64 Unix, the 'errno' variable is not thread safe.
Could anybody help me about how to make it thread safe or how to check 'errno' in a Multithreaded program ????
The Programming process is like this.
There are some definite number of threads having their own task.
There is one... (2 Replies)
Discussion started by: S.Vishwanath
2 Replies
xpacode(7) SAORD Documentation xpacode(7)
NAME
XPACode - Where to Find Example/Test Code
SYNOPSIS
The XPA source code directory contains two test programs, stest.c, and ctest.c that can serve as examples for writing XPA servers and
clients, respectively. They also can be used to test various features of XPA.
DESCRIPTION
To build the XPA test programs, execute:
make All
in the XPA source directory to generate the stest and ctest programs. (NB: this should work on all platforms, although we have had prob-
lems with unresolved externals on one Sun/Solaris machine, for reasons still unknown.)
The stest program can be executed with no arguments to start an XPA server that contains the access points: xpa, xpa1, c_xpa (containing
sub-commands cmd1 and cmd2), and i_xpa. You then can use xpaset and xpaget to interact with these access points:
cat xpa.c | xpaset xpa # send to xpa
cat xpa.c | xpaset "xpa*" # send to xpa and xpa1
xpaget xpa # receive from xpa
xpaget xpa* # receive from xpa and xpa1
etc. You also can use ctest to do the same thing, or to iterate:
ctest -s -l 100 xpa # send to xpa 100 times
ctest -s -l 100 "xpa*" # send to xpa and xpa1 100 times
ctest -g -l 100 xpa # receive from xpa 100 times
ctest -g -l 100 "xpa*" # receive from xpa and xpa1 100 times
More options are available: see the stest.c and ctest.c code itself, which were used extensively to debug XPA.
The file test.tcl in the XPA source directory gives examples for using the XPATclInterface.
SEE ALSO
See xpa(7) for a list of XPA help pages
version 2.1.14 June 7, 2012 xpacode(7)