I'm not sure if sed or awk is the answer. I was going to use sed and do a character count up to that point, but that column directly before 0640 might change values from file to file.
what makes row 2 different from row 1?
Please be more specific with your requirements....
Hi,
I am having trouble converting a text file. I have been working for this whole day now, still i couldn't make it.
Here is how the text file looks:
_______________________________________________________
DEVICE STATUS INFORMATION FOR LOCATION 1:
OPER STATES: Disabled E:Enabled ... (5 Replies)
Hello, I am using awk to process a file, and need to return a row that meets specific criteria.
awk 'BEGIN{sets variables}
{processes file, updates variables}
END{need to print a row that meets the criteria in one of the variables}
I have tried code in the END block like {print NR==var}... (1 Reply)
Hi,
I have the following text file:
8 T1mapping_flip02 ok 128 108 30 1 665000-000008-000001.dcm
9 T1mapping_flip05 ok 128 108 30 1 665000-000009-000001.dcm
10 T1mapping_flip10 ok 128 108 30 1 665000-000010-000001.dcm
11 T1mapping_flip15 ok 128 108 30... (2 Replies)
Hi all!
I need to change the final e every time when it is present in any word in column 1 to a; moreover, to change the final i again to a in any word in column 1, but just if word in column 2 begins with ha or si.
Here below you can see a sample of my data:
achwa ungeliachwa ungeli 1... (3 Replies)
Hi,
I want to delete rows that have 0 at column 4.
The file looks like this:
chr01 13 61 2
chr01 65 153 0
chr01 157 309 1
chr01 313 309 0
chr01 317 469 1
chr01 473 557 0
I want to delete all rows with a 0 at column 4
chr01 13 61 2
chr01 157 309 1
chr01 ... (3 Replies)
Hi all!
I have this kind of output:
a1|b1|c1|d1|e1
a2|b2|c2
a3|b3|c3|d3
I would like to transpose columns d and e (when they exist) in column c, and under the row where they come from.
Then copying the beginning of the row.
In order to obtain:
a1|b1|c1
a1|b1|d1
a1|b1|e1
a2|b2|c2... (1 Reply)
Hi,
I need help to remove tab delimited space in the $2 of a specific row. My file is like this:-
file1.txt
No_1 4 139 156
No_1 5 161 205
No_4 91 227 212
No_19 254 243 263
No_19 645 249 258
No_19 101 2492 2635
No_90 8 277 288... (5 Replies)
I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file.
Here is the file.
<!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Hello All of Master Script ,
i need help to solve my problem
before :
mount /dev/rdsk/c1t69d0s6 /dev/rdsk/c1t69d0s6 /vol/cl123/PURGE1 ufs
mount /dev/rdsk/c1t70d0s6 /dev/rdsk/c1t70d0s6 /vol/cl123/PURGE2 ufs
expected :
mount /dev/dsk/c1t69d0s6 /dev/rdsk/c1t69d0s6 /PURGE1 ufs
mount ... (3 Replies)
Discussion started by: k0p0nkkk
3 Replies
LEARN ABOUT NETBSD
prop_array_recv_ioctl
PROP_SEND_IOCTL(3) BSD Library Functions Manual PROP_SEND_IOCTL(3)NAME
prop_array_send_ioctl, prop_array_recv_ioctl, prop_dictionary_send_ioctl, prop_dictionary_recv_ioctl, prop_dictionary_sendrecv_ioctl -- Send
and receive propertly lists to and from the kernel using ioctl
SYNOPSIS
#include <prop/proplib.h>
int
prop_array_send_ioctl(prop_array_t array, int fd, unsigned long cmd);
int
prop_array_recv_ioctl(int fd, unsigned long cmd, prop_array_t *arrayp);
int
prop_dictionary_send_ioctl(prop_dictionary_t dict, int fd, unsigned long cmd);
int
prop_dictionary_recv_ioctl(int fd, unsigned long cmd, prop_dictionary_t *dictp);
int
prop_dictionary_sendrecv_ioctl(prop_dictionary_t dict, int fd, unsigned long cmd, prop_dictionary_t *dictp);
DESCRIPTION
The prop_array_send_ioctl, prop_array_recv_ioctl, prop_dictionary_send_ioctl, prop_dictionary_recv_ioctl, and prop_dictionary_sendrecv_ioctl
functions implement the user space side of a protocol for sending property lists to and from the kernel using ioctl(2).
RETURN VALUES
If successful, functions return zero. Otherwise, an error number is returned to indicate the error.
EXAMPLES
The following (simplified) example demonstrates using prop_dictionary_send_ioctl() and prop_dictionary_recv_ioctl() in an application:
void
foo_setprops(prop_dictionary_t dict)
{
int fd;
fd = open("/dev/foo", O_RDWR, 0640);
if (fd == -1)
return;
(void) prop_dictionary_send_ioctl(dict, fd, FOOSETPROPS);
(void) close(fd);
}
prop_dictionary_t
foo_getprops(void)
{
prop_dictionary_t dict;
int fd;
fd = open("/dev/foo", O_RDONLY, 0640);
if (fd == -1)
return (NULL);
if (prop_dictionary_recv_ioctl(fd, FOOGETPROPS, &dict) != 0)
return (NULL);
(void) close(fd);
return (dict);
}
The prop_dictionary_sendrecv_ioctl function combines the send and receive functionality, allowing for ioctls that require two-way communica-
tion (for example to specify arguments for the ioctl operation).
ERRORS
prop_array_send_ioctl() and prop_dictionary_send_ioctl() will fail if:
[ENOMEM] Cannot allocate memory
[ENOTSUP] Not supported
prop_array_recv_ioctl() and prop_dictionary_recv_ioctl() will fail if:
[EIO] Input/output error
[ENOTSUP] Not supported
In addition to these, ioctl(2) errors may be returned.
SEE ALSO prop_array(3), prop_dictionary(3), proplib(3), prop_copyin_ioctl(9)HISTORY
The proplib property container object library first appeared in NetBSD 4.0.
BSD January 21, 2008 BSD