Hi,
I am new to this forum and unix too. I have just started learning unix. As I was going through the first chapter, I read that unix is multitasking, multiprogramming, multiprocessing and multiuser OS.
My question is: Is there any difference between a TASK and a PROCESS. How are PROCESS... (2 Replies)
I have a file contains
TASK gsnmpproxy {
CommandLine = $SMCHOME/bin/gsnmpProxy.exe
}
TASK gsnmpdbgui {
CommandLine = $SMCHOME/bin/gsnmpdbgui.exe
I would like to comment and than uncomment specific task eg TASK gsnmpproxy
Pls suggest how to do in shell script (9 Replies)
I have an ASCII file that I receive on a monthly bases that is fixed length. I break the file into separate files based on a 5 character numerical sequence. I have 20 different sequences I have to find.
the input file looks something like this
xy-ins 2008yuthnrlsinrthsntwilgrha33260001... (4 Replies)
I have an task definition listing xml file that contains a list of tasks such as
<TASKLIST
<TASK definition="Completion date" id="Taskname1" Some other
<CODE name="Code12"
<Parameter pname="Dog" input="5.6" units="feet" etc /Parameter>
<Parameter... (3 Replies)
I want to make a script to automate printer adding task.My inputs are like
Printer name : xyz
Port number :9001
I should write a script to make the Printer adding task will be automated.
Like in manually adding task we are doing through hppi or jetadmin tools.
---------- Post updated at... (2 Replies)
I need to automate a manual task using shell scripting. The scenario is like :-
#!/usr/bin/sh
echo "please enter the name of the lab server to test ..."
read s
ssh $s
This is peace of the script which will allow me to login to another server using "ssh". I have a conf file which is having... (4 Replies)
Hi all,
I'm newbie and stuck here. Thanks for any help.
Input(txt file)
a b X
c d Y
e f Z
g h W
Requested output:
a b X Y
c d Y X
e f Z W
g h W Z
Please use code tags when posting data and code samples! (10 Replies)
Hi experts,
I have a problem with the below shell task:
I need to modify the file creatin a paired row , per each row
which matches filter (e.g. number of nonempty columns = 5)
Output should look like this:
second row is original one from the input,
first row(red) is pairing row, it's... (29 Replies)
Dear all,
I'm a newbie in programming and I would like to know if it is possible to parallelize the script:
for l in {1..1000}
do
cut -f$l quase2 |tr "\n" "," |sed 's/$/\
/g' |sed '/^$/d' >a_$l.t
done
I tried:
for l in {1..1000}
do
cut -f$l quase2 |tr "\n" "," |sed 's/$/\
/g' |sed... (7 Replies)
Hello everyone my name is Telis and i just registered in this forum.. i just started programming in linux shell and i need help with this easy task..
this is my code
#!/bin/sh
echo "What is your First name?"
read name
if ; then
echo "Hello Master."
else
echo "Who are you?"
fi
when i... (2 Replies)
Discussion started by: Telis
2 Replies
LEARN ABOUT SUNOS
gettaskid
settaskid(2) System Calls settaskid(2)NAME
settaskid, gettaskid, getprojid - set or get task or project IDs
SYNOPSIS
#include <sys/types.h>
#include <sys/task.h>
#include <unistd.h>
taskid_t settaskid(projid_t project, int flags);
taskid_t gettaskid(void);
#include <sys/types.h>
#include <sys/task.h>
#include <unistd.h>
#include <project.h>
projid_t getprojid(void);
DESCRIPTION
The settaskid() function makes a request of the system to assign a new task ID to the calling process, changing the associated project ID
to that specified. The calling process must have sufficient privileges to perform this operation. The flags argument should be either
TASK_NORMAL for a regular task, or TASK_FINAL, which disallows subsequent settaskid() calls by the created task.
The gettaskid() function returns the task ID of the calling process.
The getprojid() function returns the project ID of the calling process.
RETURN VALUES
Upon successful completion, these functions return the appropriate task or project ID. Otherwise, -1 is returned and errno is set to indi-
cate the error.
ERRORS
The settaskid() function will fail if:
EACCES The invoking task was created with the TASK_FINAL flag.
EAGAIN A resource control limiting the number of tasks or LWPs in the current project or zone has been exceeded.
EINVAL The given project ID is not within the valid project ID range.
EPERM The {PRIV_PROC_TASKID} privilege is not asserted in the effective set of the calling process.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO setsid(2), project(4), attributes(5), privileges(5)SunOS 5.10 28 Jun 2004 settaskid(2)