I have a file TXTPROCESS.TXT.20071129 in which line 1 contains the file name and rest of the records are data.
The file data looks like this:
TXTPROCESS.TXT.20071129
DIVD20071129
INTR20071129
BALN20071129
From line 2 onwards the first 4 characters defines individual process. What I... (2 Replies)
Hi Everybody,
I am trying to write a script that will get some perticuler data from a file and redirect to a file.
My Question is,
I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line.
I know the line numbers, I need to get all... (9 Replies)
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
I have a text file which is having 30000 lines in it. I have to create a xml file for each 10000 lines until all the lines in the text files are written. Also please help how can i get number of lines in the text file in a shell variable? (19 Replies)
Hello everyone,
I don't really know anything about scripting, but I have to manage to make this script, out of necessity.
#!/bin/bash
while read -r line; do #I'm reading from a big wordlist
instructions using $line
done
Is there a way to automatically write the $line number the script... (4 Replies)
Hi all,
I have a file sample.txt
abc
asd
adf
daf
adw
add
adv
wdf
I want to control the number of lines to read
Like if i give input as ./script_name 2 5
required output
asd
adf
daf (2 Replies)
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
I am new to ksh scripts. I would like to be able to read a file line by line from a certain line number. I have a specific line number saved in a variable, say $lineNumber. How can I start reading the file from the line number saved in $lineNumber? Thanks! (4 Replies)
Discussion started by: dcowboys13
4 Replies
LEARN ABOUT DEBIAN
vop_readdir
VOP_READDIR(9) BSD Kernel Developer's Manual VOP_READDIR(9)NAME
VOP_READDIR -- read contents of a directory
SYNOPSIS
#include <sys/param.h>
#include <sys/dirent.h>
#include <sys/vnode.h>
int
VOP_READDIR(struct vnode *vp, struct uio *uio, struct ucred *cred, int *eofflag, int *ncookies, u_long **cookies);
DESCRIPTION
Read directory entries.
vp The vnode of the directory.
uio Where to read the directory contents.
cred The caller's credentials.
eofflag Return end of file status (NULL if not wanted).
ncookies Number of directory cookies generated for NFS (NULL if not wanted).
cookies Directory seek cookies generated for NFS (NULL if not wanted).
The directory contents are read into struct dirent structures. If the on-disc data structures differ from this then they should be trans-
lated.
LOCKS
The directory should be locked on entry and will still be locked on exit.
RETURN VALUES
Zero is returned on success, otherwise an error code is returned.
If this is called from the NFS server, the extra arguments eofflag, ncookies and cookies are given. The value of *eofflag should be set to
TRUE if the end of the directory is reached while reading. The directory seek cookies are returned to the NFS client and may be used later
to restart a directory read part way through the directory. There should be one cookie returned per directory entry. The value of the
cookie should be the offset within the directory where the on-disc version of the appropriate directory entry starts. Memory for the cookies
should be allocated using:
...;
*ncookies = number of entries read;
*cookies = (u_int*)#
malloc(*ncookies * sizeof(u_int), M_TEMP, M_WAITOK);
ERRORS
[EINVAL] An attempt was made to read from an illegal offset in the directory.
[EIO] A read error occurred while reading the directory.
SEE ALSO vnode(9)AUTHORS
This manual page was written by Doug Rabson.
BSD July 24, 1996 BSD