Hello,
I need to insert a line (like a header) as the first line of a very huge file (about 3 ml rows). I am able to do it with sed, but redirecting the output and creating a new file takes quite some time. I was wondering if there was a more efficient way of doing it?
Any help would be... (3 Replies)
i need help..!!!!
i have one big text file estimate data file size 50 - 100GB with 70 Mega Rows.
on OS SUN Solaris version 8
How i can remove first line of the text file.
Please suggest me for solutions.
Thank you very much in advance:) (5 Replies)
So, I want to read line-by-line a text file with unknown number of files....
So:
a=1
b=1
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
done
the problem is that sed does not seem to recognise the $a, even when trying
sed -n ' $a p'
So, I cannot read... (3 Replies)
I have file which contains around 5000 lines.
The lines are fixed legth but having no delimiter.Each line line contains nearly 3000 characters.
I want to delete the lines
a> if it starts with 1 and if 576th postion is a digit i,e 0-9
or
b> if it starts with 0 or 9(i,e header and footer)
... (4 Replies)
Hi Experts,
I had to edit (a particular value) in header line of a very huge file so for that i wanted to search & replace a particular value on a file which was of 24 GB in Size. I managed to do it but it took long time to complete. Can anyone please tell me how can we do it in a optimised... (7 Replies)
Hi,
I have a huge file with a single line.
But I want to break that line into lines of with each line having five columns.
My file is like this:
code:
"hi","there","how","are","you?","It","was","great","working","with","you.","hope","to","work","you."
I want it like this:
code:... (1 Reply)
We have a huge file which has just one really large line; about 500 MB. I want to
1. Count all the occurrences of a phrase
2. Replace the phrase with another.
Trying to open it using vi has not helped as it complains that it is too large. Can any script help? Please advise.
Thank you, (12 Replies)
Hi,
I want to read a live log file line by line and considering those line which start from time stamp;
Below code I am using, which read line but throws an exception when comparing line that does not contain error code
tail -F /logs/COMMON-ERROR.log | while read myline; do... (2 Replies)
Hi ,
I would like to replace new line characters(\n) in a huge file of about 2 million records . I tried this one (:%s/\n//g) but it's hanging there and no result. Does this command do not work if the file is big. Please let me know if you have any other options
Regards
Raj (1 Reply)
Discussion started by: rajeevm
1 Replies
LEARN ABOUT OPENSOLARIS
read
read(9E) Driver Entry Points read(9E)NAME
read - read data from a device
SYNOPSIS
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/open.h>
#include <sys/uio.h>
#include <sys/cred.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
int prefixread(dev_t dev, struct uio *uio_p, cred_t *cred_p);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). This entry point is optional.
PARAMETERS
dev Device number.
uio_p Pointer to the uio(9S) structure that describes where the data is to be stored in user space.
cred_p Pointer to the user credential structure for the I/O transaction.
DESCRIPTION
The driver read() routine is called indirectly through cb_ops(9S) by the read(2) system call. The read() routine should check the valid-
ity of the minor number component of dev and the user credential structure pointed to by cred_p (if pertinent). The read() routine should
supervise the data transfer into the user space described by the uio(9S) structure.
RETURN VALUES
The read() routine should return 0 for success, or the appropriate error number.
EXAMPLES
Example 1 read() routine using physio()
The following is an example of a read() routine using physio(9F) to perform reads from a non-seekable device:
static int
xxread(dev_t dev, struct uio *uiop, cred_t *credp)
{
int rval;
offset_t off;
int instance;
xx_t xx;
instance = getminor(dev);
xx = ddi_get_soft_state(xxstate, instance);
if (xx == NULL)
return (ENXIO);
off = uiop->uio_loffset;
rval = physio(xxstrategy, NULL, dev, B_READ,
xxmin, uiop);
uiop->uio_loffset = off;
return (rval);
}
SEE ALSO read(2), write(9E), physio(9F), cb_ops(9S), uio(9S)
Writing Device Drivers
SunOS 5.11 19 Nov 1997 read(9E)