Excellent!!
Thanks for your help. I don't have GNU awk so all other solutions works good for me.
Last suggestion given by Chubler_XL does not give right output but rest all works good.
Thanks for your support.
---------- Post updated at 02:00 PM ---------- Previous update was at 09:52 AM ----------
Hi,
Sorry to come back again on same issue.I am stuck again with solution
I am trying to use solution provided by shamrock
How do I put that part in function so that whatever string I pass, it will sort and give me output in variable for further usage like comparison as below
In my actual program, pref and baseline will not be shell variable but variable in awk itself derived based on line of input. So before comparing (pref == baseline), I want to sort both so that compare can work. something like below where sortme will be function defined inline using code provided by shamrock.
looking something as below
Appreciate your help.
Hi,
I need help to sort a file contents.
I am using sort -r option to basically reverse the comparison in descending order. However, i found out that my file is not sorted according, can anyone please help.
My data is something like:-
Hello world
20.982342864 343
19.234355545 222... (5 Replies)
hey gurus,
my-build1-abc
my-build10-abc
my-build2-abc
my-build22-abc
my-build3-abc
basically i want to numerically sort the entire lines based on the build number. I dont zero pad the numbers because thats "how it is" ;-)
sort -n won't work because it starts from the beginning.
... (10 Replies)
I'm not familiar with find.
If i use find in a certain directory i want it to show based on hierarchy.
find . type d
fol1
fol1/subfol1
fol1/subfol1/subfol1
fol2
fol2/subfol2
i want it to show like this
fol1/subfol1/subfol1
fol1/subfol1
fol1
fol2/subfol2
fol2
do i need to use... (5 Replies)
Hi Folks,
Currently am working with 10g db. I want to sort the below o/p.
Current output:
============
SQL> select partition_name from user_tab_partitions where table_name='USER_AUDIT';
PARTITION_NAME
------------------------------
PARTMAX
PART_AUDIT_NOV02
PART_AUDIT_NOV08... (4 Replies)
I want to sort lines by how many times a string occurs in each line (the most times first).
I know how to do this in two passes (add a count field in the first pass then sort on it in the second pass).
However, can it be done more optimally with a single AWK command? My AWK has improved... (11 Replies)
It is for HP-Unix B.11.31.
Requirement:
1. List the directories, which directories name has given particular string.
Example: Directories with name "Build"
2. On the output of 1. list the directories by creation date as sort order.
I tried with; find . -type d -name "Build*"
... (3 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Hi guys,
I am trying to sort numbers in the string in descending order but for some reason sort fails.
n129$ echo "81 240" | sort -r
81 240
n129$
I am not sure what am I doing wrong. Is there a 100% reliable way to make sure that sort will always work. I mean on SUNS and IBM machines. ... (4 Replies)
Hi,
I am having contents in a file like below,
cat testfile
rpool/swap
rpool/swap14
rpool/swap2
rpool/swap3
I want to sort the above contents like,
rpool/swap
rpool/swap2
rpool/swap3
rpool/swap14
I have tried in this way, (7 Replies)
Discussion started by: Sumanthsv
7 Replies
LEARN ABOUT NETBSD
prop_dictionary_copyout_ioctl
PROP_COPYIN_IOCTL(9) BSD Kernel Developer's Manual PROP_COPYIN_IOCTL(9)NAME
prop_array_copyin_ioctl, prop_array_copyout_ioctl, prop_array_copyin, prop_array_copyout, prop_dictionary_copyin_ioctl,
prop_dictionary_copyout_ioctl, prop_dictionary_copyin, prop_dictionary_copyout -- Copy property lists to and from kernel space
SYNOPSIS
#include <prop/proplib.h>
int
prop_array_copyin_ioctl(const struct plistref *pref, const u_long cmd, prop_array_t *arrayp);
int
prop_array_copyin(const struct plistref *pref, prop_array_t *arrayp);
int
prop_array_copyout_ioctl(struct plistref *pref, const u_long cmd, prop_array_t array);
int
prop_array_copyout(struct plistref *pref, prop_array_t array);
int
prop_dictionary_copyin_ioctl(const struct plistref *pref, const u_long cmd, prop_dictionary_t *dictp);
int
prop_dictionary_copyin(const struct plistref *pref, prop_dictionary_t *dictp);
int
prop_dictionary_copyout_ioctl(struct plistref *pref, const u_long cmd, prop_dictionary_t dict);
int
prop_dictionary_copyout(struct plistref *pref, prop_dictionary_t dict);
DESCRIPTION
The prop_array_copyin_ioctl, prop_array_copyout_ioctl, prop_dictionary_copyin_ioctl, and prop_dictionary_copyout_ioctl functions implement
the kernel side of a protocol for copying property lists to and from the kernel using ioctl(2). The functions prop_array_copyin,
prop_array_copyout, prop_dictionary_copyin, and prop_dictionary_copyout implement the kernel side of a protocol for copying property lists to
the kernel as arguments of normal system calls.
A kernel routine receiving or returning a property list will be passed a pointer to a struct plistref. This structure encapsulates the ref-
erence to the property list in externalized form.
RETURN VALUES
If successful, functions return zero. Otherwise, an error number will be returned to indicate the error.
EXAMPLES
The following (simplified) example demonstrates using prop_dictionary_copyin_ioctl() and prop_dictionary_copyout_ioctl() in an ioctl routine:
extern prop_dictionary_t fooprops;
int
fooioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l)
{
prop_dictionary_t dict, odict;
int error;
switch (cmd) {
case FOOSETPROPS: {
const struct plistref *pref = (const struct plistref *) data;
error = prop_dictionary_copyin_ioctl(pref, cmd, &dict);
if (error)
return (error);
odict = fooprops;
fooprops = dict;
prop_object_release(odict);
break;
}
case FOOGETPROPS: {
struct plistref *pref = (struct plistref *) data;
error = prop_dictionary_copyout_ioctl(pref, cmd, fooprops);
break;
}
default:
return (EPASSTHROUGH);
}
return (error);
}
The following (simplified) example demonstrates using prop_array_copyin() in a routine:
int
foocopyin(const struct plistref *pref))
{
prop_array_t array;
int error;
error = prop_array_copyin(pref, &array);
if (error)
return (error);
...
}
ERRORS
prop_array_copyin_ioctl() and prop_dictionary_copyin_ioctl() will fail if:
[EFAULT] Bad address
[EIO] Input/output error
[ENOMEM] Cannot allocate memory
[ENOTSUP] Not supported
prop_array_copyout_ioctl() and prop_dictionary_copyout_ioctl() will fail if:
[EFAULT] Bad address
[ENOMEM] Cannot allocate memory
[ENOTSUP] Not supported
SEE ALSO prop_array(3), prop_dictionary(3), prop_send_ioctl(3), prop_send_syscall(3), proplib(3)HISTORY
The proplib property container object library first appeared in NetBSD 4.0.
BSD January 17, 2011 BSD