Hello,
I have a variable that displays the following results from a JVM....
1602100K->1578435K
I would like to collect the value of 1578435 which is the value after a garbage collection. I've tried the following command but it looks like I can't get the > to work. Any suggestions as... (4 Replies)
Hi all
I want to do a simple substitution in awk but I am getting unexpected output. My function accepts a time and then prints out a validation message if the time is valid. However some times may include a : and i want to strip this out if it exists before i get to the validation. I have shown... (4 Replies)
Hi there!
I am really enjoying working with sed. I am trying to come up with a sed command to replace some occurrences (not all) in the same line, for instance:
I have a command which the output will be:
200.300.400.5 0A 0B 0C 01 02 03
being that the last 6 strings are actually one... (7 Replies)
Hi,
I tried to adapt bartus's solution to my problem, without success. I want to replace all the occurences of this:
with:
, where something can contain an arbitrary number of balanced parens and brakets.
Any ideas ?
Best, (1 Reply)
I must design a UNIX script to monitor files whose size is over a threshold of 5 MB in a specific UNIX directory
I meet a problem during the for loop in my script. Some file names contain spaces.
ls -lrt | awk '$5>=5000000 && length($8)==5 {gsub(/ /,"_",$9); print};'
-rw-r--r-- 1 was61 ... (2 Replies)
Hi all.
I have the following command that is successfully searching for any one of the strings on all lines of a file and replacing it with the instructed value.
cat inputFile | awk '{gsub(/aaa|bbb|ccc|ddd/,"1234")}1' > outputFile
This does in fact replace any occurrence of aaa, bbb,... (2 Replies)
Hi,I have 2 files master.txt & reference.txt as shown below & i require o/p as mentioned in file 3 using awk but content is not replacing properlymaster.txt:... (15 Replies)
Hi I have a source file that looks like
a,b,c,d,e,f,g,h,t,DISTI(USD),MSRP(USD),DIST(EUR),MSRP(EUR),EMEA-DISTI(USD),EMEA-MSRP(USD),GLOBAl-DISTI(USD),GLOBAL-MSRP(USD),DISTI(GBP), MSRP(GBP)
I want to basically change MSRP(USD) to MSRP,USD and DIST(EUR) to DIST,EUR and likewise for all i'm using... (3 Replies)
Hi Forum.
I'm trying to cleanup the following data elements (To remove any occurences of commas and any extra spaces) while preserving the <TAB> delimiter using awk gsub but I have not been successful.
Original Data:
4365 monte des source rue,, ,<TAB>trevost<TAB>QC
Desired Data:... (1 Reply)
Discussion started by: pchang
1 Replies
LEARN ABOUT DEBIAN
refcount_acquire
REFCOUNT(9) BSD Kernel Developer's Manual REFCOUNT(9)NAME
refcount, refcount_init, refcount_acquire, refcount_release -- manage a simple reference counter
SYNOPSIS
#include <sys/param.h>
#include <sys/refcount.h>
void
refcount_init(volatile u_int *count, u_int value);
void
refcount_acquire(volatile u_int *count);
int
refcount_release(volatile u_int *count);
DESCRIPTION
The refcount functions provide an API to manage a simple reference counter. The caller provides the storage for the counter in an unsigned
integer. A pointer to this integer is passed via count. Usually the counter is used to manage the lifetime of an object and is stored as a
member of the object.
The refcount_init() function is used to set the initial value of the counter to value. It is normally used when creating a reference-counted
object.
The refcount_acquire() function is used to acquire a new reference. The caller is responsible for ensuring that it holds a valid reference
while obtaining a new reference. For example, if an object is stored on a list and the list holds a reference on the object, then holding a
lock that protects the list provides sufficient protection for acquiring a new reference.
The refcount_release() function is used to release an existing reference. The function returns a non-zero value if the reference being
released was the last reference; otherwise, it returns zero.
Note that these routines do not provide any inter-CPU synchronization, data protection, or memory ordering guarantees except for managing the
counter. The caller is responsible for any additional synchronization needed by consumers of any containing objects. In addition, the call-
er is also responsible for managing the life cycle of any containing objects including explicitly releasing any resources when the last ref-
erence is released.
RETURN VALUES
The refcount_release function returns non-zero when releasing the last reference and zero when releasing any other reference.
HISTORY
These functions were introduced in FreeBSD 6.0.
BSD January 20, 2009 BSD