Hi everyone,
Having trouble with sed. I searched the board and found some stuff, but still unclear.
I have a file named "userfile" which stores the users info in this form: email:username:password:
I want the user to be able to change their password.
i tried with sed s/oldpass/newpass/g... (2 Replies)
Hi. Does anyone know how to use the sed command to change the special border characters on this .per file. I have to edit about 80 .per files. I need a sed script to change the below 3 and A characters.
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ Test Islands, Office of Public Health -- WIC... (4 Replies)
I have a text
"abc def ghi"
and I want to get it as
"def abc ghi"
I am using this
echo "abc def ghi" | sed 's/\(*\)\(*\)/\2\1/'
But I am not able to get the output, could anyone help me.
Thanks (9 Replies)
hello
I have this:
sed -e "s/install_location=....../g" -e "s/hostname=....../g" -e "s/server_name=....../y" input.txt
it will display on the screen what have changed. however I want to change file input.txt. Any idea other than doing redirection (>)
thx (2 Replies)
Hi,
I have a file whose structure is like this
7
7
1 2 3 4 5
1 3 4 8 6
1 4 5 6 0
2 6 8 3 8
2 5 7 8 0
5 7 9 4 1
3 8 0 2 2
3 5 6 8
basically first two row tell the number of rows and column but the data following them are not arranged in that format. now i want to create another... (1 Reply)
Hi everyone,
I've got a problem with converting C comments ( /* */ ) into C++ style ( // ) in some source file with sed. So far I've dealt with comments on one line, but I don't know how to convert when it is over multiple lines ...
So I already have something like this:
comments.sed
... (8 Replies)
I'm changing some html code on multiple web pages and I need to match particular phrases but keep some text within each phrase.
E.G. I need to change this line:
<DIV id="heading">Description:</DIV>
into
<span class="hlred">Description:</span><br />
The text "Description:" may... (2 Replies)
Can somebody help me out and provide me with a SED or AWK solution that converts TO_DATE CLAUSE -> TIMESTAMP
I need to keep the PARTION value (HISTORY_20110417) and DATE/TIME value (2011-04-18 00:00:00) the same for every line
PARTITION HISTORY_20110417 VALUES LESS THAN (TO_DATE('... (3 Replies)
I have a file containing numbers in a column like:
10.5
16.3
15.7
2.3
46.8
3.3
.
.
.
and I was wondering if there was a way to make it show up in an array form like:
10.5 2.3
16.3 46.8
15.7 3.3
Let's say I want to make a new column every 100 values. How can I do... (8 Replies)
Hi !
I try to change a time-stamp hh:mm:ss allways to full ten-minutes.
example: 12:51:03 to 12:50:03
sed 's/::/:{0-5}0:/g' file.txt
but it will not work propperly, because the minute-decade will be replaced with the bracket-term {0-5}. Can someone please give me a hint?
Thanks in... (6 Replies)
Discussion started by: IMPe
6 Replies
LEARN ABOUT OSX
xpc_array_get_bool
xpc_array_create(3) BSD Library Functions Manual xpc_array_create(3)NAME
xpc_array_create -- creation and management of XPC arrays
SYNOPSIS
#include <xpc/xpc.h>
xpc_object_t
xpc_array_create(const xpc_object_t *objects, size_t count);
void
xpc_array_set_value(xpc_object_t array, size_t index, xpc_object_t value);
void
xpc_array_append_value(xpc_object_t array, xpc_object_t value);
xpc_object_t
xpc_array_get_value(xpc_object_t array, size_t index);
size_t
xpc_array_get_count(xpc_object_t array);
bool
xpc_array_apply(xpc_object_t array, xpc_array_applier_t applier);
void
xpc_array_set_bool(xpc_object_t array, size_t index, bool value);
void
xpc_array_set_int64(xpc_object_t array, size_t index, int64_t value);
void
xpc_array_set_uint64(xpc_object_t array, size_t index, uint64_t value);
void
xpc_array_set_double(xpc_object_t array, size_t index, double value);
void
xpc_array_set_date(xpc_object_t array, size_t index, int64_t value);
void
xpc_array_set_data(xpc_object_t array, size_t index, const void *bytes, size_t length);
void
xpc_array_set_string(xpc_object_t array, size_t index, const char *value);
void
xpc_array_set_uuid(xpc_object_t array, size_t index, const uuid_t value);
void
xpc_array_set_fd(xpc_object_t array, size_t index, int value);
void
xpc_array_set_connection(xpc_object_t array, size_t index, xpc_connection_t value);
bool
xpc_array_get_bool(xpc_object_t array, size_t index);
int64_t
xpc_array_get_int64(xpc_object_t array, size_t index);
uint64_t
xpc_array_get_uint64(xpc_object_t array, size_t index);
double
xpc_array_get_double(xpc_object_t array, size_t index);
int64_t
xpc_array_get_date(xpc_object_t array, size_t index);
const void *
xpc_array_get_data(xpc_object_t array, size_t index, size_t *length);
const uint8_t *
xpc_array_get_uuid(xpc_object_t array, size_t index);
const char *
xpc_array_get_string(xpc_object_t array, size_t index);
int
xpc_array_get_fd(xpc_object_t array, size_t index);
xpc_connection_t
xpc_array_get_connection(xpc_object_t array, size_t index);
ARRAYS
XPC arrays are collections of XPC objects ordered by index. The index is zero-based. XPC arrays are contiguous, and values must exist at all
indexes between zero and the greatest index of the array. A hole in the array can be simulated by using a null object as returned by
xpc_null_create(3).
CREATION
The xpc_array_create() function returns a newly created array. The caller may optionally provide objects, a C array of XPC object references,
to initialize the array. The count is used to specify the size of the C array. If objects is NULL, then count must be zero. If count speci-
fies more elements than are actually present in values or if values is NULL and count is non-zero, the behavior is undefined.
GETTING AND SETTING VALUES
The xpc_array_append_value() function may be used to append a value to the end of an array. This operation increases the count of the values
in the array by one.
The value of a specific index in the array may be set using the xpc_array_set_value() function. The value must be non-NULL, and the index
must already exist (i.e. less than the count provided at creation or extended through previous append operations).
The value at a specific index of an array may be retrieved using the xpc_array_get_value() function. The result of getting a non-existing
index (i.e. one that was not specified at creation or through a previous append operation) in undefined.
PRIMITIVE GET AND SET FUNCTIONS
Various functions exist for retrieving primitive C and operating system types directly from an array without the need for an intermediate
boxed object. See xpc_object(3) for more information.
The special XPC_ARRAY_APPEND constant may be used to append a value to the end of the array instead of operating on a specific index.
SEE ALSO xpc_object(3), xpc_objects(3), xpc_dictionary_create(3)Darwin 1 July, 2011 Darwin