Is the code compiling alright? From the code you have posted it should dump because of how the input file is being specified specifically the code segment shown above. So how are you specifying the input filename to the compiled executable?
Hi all,
How can I quickly show Nth line from the huge file(at least more than 15GB)? I used the following script but seems slower.
See 2717298 th line.
head -2717298 data0802.dat | tail -1
Thank you very much (4 Replies)
i'm a beginner in shell and i have a txt file that is updating every second or msec so i need a program to read the last line of this txt file
is this possible to do? (5 Replies)
Hi,
I have a .txt file which contains the x, y and z co-ordinates of particles which I am trying to cast for a particular compound. The no. of particles present is of the order of 2 billion and hence the size of the text file is of the order of a few Gigabytes. The particles have been casted layer... (5 Replies)
In a txt file called, eso.txt, I have:
......
3 where process_status_flag = 70 and LISTENER_ID in (930.00, 931.00, 932.00, 933.00, 934.00)
4 group by LISTENER_ID
5 order by LISTENER_ID;
LISTENER COUNT
----------... (3 Replies)
So I have a python program that I run, which runs accordingly to options I have listed in a text file (ie user_prefs). Now there are many options listed in this user_prefs.txt, but the one of most interest to me is that of the file path of the time series.
I have over a hundred of these time... (8 Replies)
I want to add/append the info in the following format to my.txt file.
20130702|abcd20130702.txt FN|SN|DOB
I tried the below script but it throws me some exceptions.
<#!/bin/sh
dt = date '+%y%m%d'members;
echo $dt+|+members+$dt;
/usr/bin/awk -f
BEGIN { FS="|"; OFS="|"; } { print... (6 Replies)
Hi,
i have a scenario were i should compare a few fields from each line then increment a variable based on that.
Example file
989878|8999|Y|0|Y|N|V
989878|8999|Y|0|N|N|V
989878|8999|Y|2344|Y|N|V
i have 3 conditions to check and increment a variable on every line
condition 1 if ( $3... (4 Replies)
Hello All,
I have file a.txt
I want to add a counter loop at the end of each line in a file
ill explain:
i have a site h**p://test.test=Elite#1
i want to add a a counter to the number at the end of the file, that it will be like this
urlLink//test.test=Elite#1
urlLink//test.test=Elite#2... (3 Replies)
Hi All
Is there a way to export every line into new txt file where by the title of each txt output are same as the line ?
I have this txt files containing names:
Kandra Vanhooser
Rhona Menefee
Reynaldo Hutt
Houston Rafferty
Charmaine Lord
Albertine Poucher
Juana Maes
Mitch Lobel... (2 Replies)
Hi
I have problem with replace line in txt file , I have this string:
144185 DISK
Piece qqr8ot6l_1_1
--
144186 DISK
Piece ukr8pf2e_1_1
--
144187 DISK
Piece ter8p9gc_1_1
--
144188 DISK
Piece 4er8qb84_1_1
and (8 Replies)
Discussion started by: primo102
8 Replies
LEARN ABOUT DEBIAN
refcount_init
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