I need to list the files that do not match the search pattern:
Example:
cat file1
This is how it should work
cat file2
This is why I like Unix
grep -option? Unix * (or some other command)
returns file1 (1 Reply)
I need to list the files that do not match the search pattern:
Example:
cat file1
This is how it should work
cat file2
This is why I like Unix
grep -option? Unix * (or some other command)
returns file1 (7 Replies)
Hello,
I am trying to match a string between line one and line two with in the file. But I dont want to search based on the given filename. Instead I want to search for all available files in the specific directory. Please help me on the above. (2 Replies)
Hi guys
I need help in comparing 2 files
for example
file1:
asdf|gdddd|acx
asdf|vcxzz|eww
avxc|bvvce|qwe
file2:
qwer|asdfg|sss
avxc|bvvce|eww
aass|weews|llk
I need to get the lines that are present in file1 but not found in file2.
so in these case (5 Replies)
>testfile
while read x
do
if then
echo $x >> testfile
else
fi
if then
echo $x >> testfile
else
fi
done < list_of_files
is there any efficient way to search abc.dml and xyz.dml ? (2 Replies)
I am trying to search for lines present in file a that do not exist in file b and print out the lines. E.g.
file a
apple
pear
banana
orange
file b
apple
banana
orange
would output to stdout: pear.
... (3 Replies)
I have a file 1.txt with the below contents.
-----cat 1.txt-----
1234
5678
1256
1234
1247
-------------------
I have 3 more files in a folder
-----ls -lrt-------
A1.txt
A2.txt
A3.txt
-------------------
The contents of those three files are similar format with different data values... (8 Replies)
Hi,
Need your help for this scripting issue I have. I am not really good at this, so seeking your help.
I have a file looking similar to this:
Hello, i am human and name=ABCD.
How are you?
Hello, i am human and name=PQRS.
I am good.
Hello, i am human and name=ABCD.
Good bye.
Hello, i... (12 Replies)
Hi All,
I Have 2 files.
file1:
abc.xml.gz
abcd.xml.gz
xyz.xml.gz
X.xml.gz
File2
abc.
x.
cde.
unix.
My requirment is search File1 using File2 and need below ouput. (6 Replies)
how to find multiple lines in to multiple files if matched lines then do
f1 f2 f3 are files ,lines contain matched lines
f1
asdasdasdasd
asdasdasdasd
abc
def
Business date cannot be as of date
ghi
sdasdasdasda
asdasdasdada
f2 (1 Reply)
Discussion started by: Kalia
1 Replies
LEARN ABOUT MINIX
setbuf
SETBUF(3) Library Functions Manual SETBUF(3)NAME
setbuf, setvbuf - assign buffering to a stream
SYNOPSIS
#include <stdio.h>
int setbuf(FILE *stream, char *buf)
int setvbuf(FILE *stream, char *buf, int type, size_t size)
DESCRIPTION
The three types of buffering available are unbuffered, block buffered, and line buffered. When an output stream is unbuffered, information
appears on the destination file or terminal as soon as written; when it is block buffered many characters are saved up and written as a
block; when it is line buffered characters are saved up until a newline is encountered or input is read from stdin. Fflush (see fclose(3))
may be used to force the block out early. Normally all files are block buffered. A buffer is obtained from malloc(3) upon the first getc
or putc(3) on the file. If the standard stream stdout refers to a terminal it is line buffered. The standard stream stderr is always
unbuffered.
Setbuf is used after a stream has been opened but before it is read or written. The character array buf is used instead of an automati-
cally allocated buffer. If buf is the constant pointer NULL, input/output will be completely unbuffered. A manifest constant BUFSIZ tells
how big an array is needed:
char buf[BUFSIZ];
Setvbuf, an alternate form of setbuf, is used after a stream has been opened but before it is read or written. It has three uses, depend-
ing on the value of the type argument:
setvbuf(stream, buf, _IOFBF, size)
Causes input/output to be fully buffered using the character array buf whose size is determined by the size argument. If buf is the
constant pointer NULL, then an automatically allocated buffer will be used.
setvbuf(stream, buf, _IOLBF, size)
Like above, except that output will be line buffered, i.e. the buffer will be flushed when a newline is written, the buffer is full,
or input is requested.
setvbuf(stream, buf, _IONBF, size)
Causes input/output to be completely unbuffered. Buf and size are ignored.
A file can be changed between unbuffered, line buffered, or block buffered by using freopen (see fopen(3)) followed by the appropriate
setvbuf call.
SEE ALSO fopen(3), getc(3), putc(3), malloc(3), fclose(3), puts(3), printf(3), fread(3).
4th Berkeley Distribution May 12, 1986 SETBUF(3)