Assuming you have a loop of some sort around your output statement, you could do something like this:-
It's up to you where you want to set the redirection to append to the file. If you want to overwrite the file each time, you can perform a file open with:-
I have written the printf with two arguments in case $var contains spurious data that could cause printf to do something unexpected. Some people find this annoying but it protects you somewhat from potentially damaging input.
Hi
I have a file with contents like
china
india
france
japan
italy
germany
.
.
.
.
etc....
I want the output as
china|india|france|japan|italy|germany|.|.|. (3 Replies)
hey gents,
I'm working on something that will use snmpwalk to query the devices on my network and retreive the device name, device IP, device model and device serial. I'm using Nmap for the enumeration and sed to clean up the results for use by snmpwalk. Once i get all the data organized I'm... (8 Replies)
Hi,
Please suggest, how to get the output of below script in single line, its giving me in different lines
______________________
#!/bin/ksh
export Path="/abc/def/ghi";
Home="/home/psingh/prat";
cd $Path;
find $Path -name "*.C#*" -newer "abc.C#1234" -print > $Home
cat $Home | while... (1 Reply)
Hello UNIX experts,
I have 124 text files in a directory. I want to extract the 45678th line of all the files sequentialy by file names. The extracted lines should be printed in the output file on seperate lines.
e.g. The input Files are one.txt, two.txt, three.txt, four.txt
The cat of four... (1 Reply)
I have a large 3479 line .csv file, the content of which looks likes this:
1;0;177;170;Guadeloupe;x
2;127;171;179;Antigua and Barbuda;x
3;170;144;2;Umpqua;x
4;170;126;162;Coos Bay;x
...
1205;46;2;244;Unmak Island;x
1206;47;2;248;Yunaska Island;x
1207;0;2;240;north sea;x... (5 Replies)
Hi,
My Oracle query is returing below o/p
----------------------------------------------------------
Ins trnas value
a lkp1 x
a lkp1 y
b lkp1 a
b lkp2 x
b lkp2 y ... (7 Replies)
Hi all,
I have a single line output like below
echo $ips
10.26.208.28 10.26.208.26 10.26.208.27
want to convert above single line output as below format. Pls advice how to do ?
10.26.208.28
10.26.208.26
10.26.208.27
Regards
Kannan (6 Replies)
I need to match two patterns in a log file and need to get the next line of the one of the pattern (out of two patterns) that is matched,
finally need to print these three values in a single line.
Sample Log:
2013/06/11 14:29:04 <0999> (725102) Processing batch 02_1231324
2013/06/11... (4 Replies)
performing this code to read from file and print each character in separate line
works well with ASCII encoded text
void
preprocess_file (FILE *fp)
{
int cc;
for (;;)
{ cc = getc (fp);
if (cc == EOF)
break;
printf ("%c\n", cc);
}
}
int
main(int... (1 Reply)
I am trying to use awk to find all the $3 values in file2 that are between $2 and $3 in file1. If a value in $3 of file2 is between the file1 fields then it is printed along with the $6 value in file1. Both file1 and file2 are tab-delimited as well as the desired output. If there is nothing to... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT OSF1
destroy_pset
destroy_pset(3) Library Functions Manual destroy_pset(3)NAME
destroy_pset - Destroys a processor set
LIBRARY
Pset Library (libpset.a)
Mach Library (libmach.a)
SYNOPSIS
#include <sys/types.h> #include <sys/processor.h>
int destroy_pset(
int pset_id, [1 | 0]);
PARAMETERS
Specifies the identification number for the processor set that you want to destroy. The pset_id processor set identification number is
returned by a successful create_pset() call. A second argument may be required if there are threads or processors assigned to the proces-
sor set. A value of 1 will force the destruction of the pset. A value of 0 will not force destruction automatically but will first prompt
the user.
DESCRIPTION
The destroy_pset function destroys a processor set. A processor that belongs to a destroyed processor set is returned to the default pro-
cessor set. You must have root privileges.
EXAMPLES
The following is example code for pset_destroy.c using the destroy_pset call: retval = destroy_pset(pset_id, 0);
if (retval == PROCESSOR_SET_ACTIVE) {
printf ("processor set %d has active ", pset_id);
printf ("processors/tasks/threads assigned to it.0);
printf ("destroy anyway? (y/n): ");
while ((char)c != 'y' && (char)c != 'n')
c = getchar();
if ((char)c == 'y') {
retval = destroy_pset(pset_id, 1);
if (retval != KERN_SUCCESS) {
print_pset_error(retval);
RETURN VALUES
If the destroy_pset function succeeds, it returns a zero (0). If it fails, it returns a negative number. Use this number and the
print_pset_error(3) function to print a message that describes the error.
Processor set destruction is logged in the /var/adm/wtmp file.
FILES
/var/adm/wtmp
RELATED INFORMATION create_pset(3), assign_cpu_to_pset(3), assign_pid_to_pset(3), print_pset_error(3), processor_sets(4), pset_create(1) delim off
destroy_pset(3)