02-20-2020
Have you tried running the grep -E -v "string1|string2" and observe the results ?
Regards
Peasant.
This User Gave Thanks to Peasant For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a sql file and i need to extract the table names used in the sql file using a unix script. If i can extract the lines between the keywords 'FROM' and 'WHERE' in the file, my job is done. can somebody tell me how to do this using a shell script. If u can just let me know, how to... (2 Replies)
Discussion started by: babloo
2 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
I'm very very new to UNIX and AWK world.Please help me in finding a solution for my problem.
I'm having a file like this
-----------------------------------------------------------------
~Version Information
VERS. 2.0: CWLS log ASCII Standard -VERSION 2.0
WRAP. ... (4 Replies)
Discussion started by: santyshyam
4 Replies
3. Shell Programming and Scripting
Hi,
HP-UX gxxxxxxxc B.11.23 U ia64 3717505098 unlimited-user license
I have a file with below pipe separated field values:
xxx|xxx|abcd|xxx|xxx|xx
xxx|xxx|abcd#123|xxx|xxx|xx
xxx|xxx|abcd#345|xxx|xxx|xx
xxx|xxx|pqrs|xxx|xxx|xx
xxx|xxx|pqrs#123|xxx|xxx|xx
The third field has values like... (6 Replies)
Discussion started by: Nanu_Manju
6 Replies
4. Shell Programming and Scripting
Thank you for assisting,
I've got a partial solution just needs a tweak.
Hulk-BASH$ cat somefile.txt
oh there is some stuff here
some more stuff here
START_LABEL
stuff I want
more stuff I want
END_LABEL
other stuff here too
and even more stuff here too
Hulk-BASH$
Hulk-BASH$ sed... (8 Replies)
Discussion started by: laser
8 Replies
5. Shell Programming and Scripting
Hi all,
I have a positional text file that comes from some source application. Before it is processed by destination application I have to add some header (suffix) to every record(line) in the file.
e.g.
Actual File
...............
AccountDetails
AcNO Name Amount
1234 John 26578
5678... (3 Replies)
Discussion started by: sharath160
3 Replies
6. Shell Programming and Scripting
Hello all
I am getting data like
col1 | col2 | col3
asdafa | asdfasfa | asf*&^sgê
345./ |sdfasd23425^%^&^ | sdfsa23
êsfsfd | sf(* | sdfsasf
My requirement is like
I have to to read the file and remove all special characters and hex characters ranging form 00-1f from 1st column, remove %"'... (1 Reply)
Discussion started by: vasuarjula
1 Replies
7. Shell Programming and Scripting
Hi Guys,
I need some script in removing lines containing strings like ",, ," and "rows". Retain only numbers as the output. See below for the input and output file.
INPUT FILE:
9817
9832
6285
6312
6313
6318
,, ,
6329
7078
7098
7130
7959
7983 (7 Replies)
Discussion started by: pinpe
7 Replies
8. Shell Programming and Scripting
The question is not as simple as the title... I have a file, it looks like this
<string name="string1">RZ-LED</string>
<string name="string2">2.0</string>
<string name="string2">Version 2.0</string>
<string name="string3">BP</string>
I would like to check for duplicate entries of... (11 Replies)
Discussion started by: raidzero
11 Replies
9. Shell Programming and Scripting
Have two files and want to compare the content of file1 with file2. When matched remove the line.
awk 'NR==FNR {b; next} !(b in $0)' file1 file2file1
1. if match
2. removefile2
1. this line has to be removed if match
2. this line has a match, remove
3. this line has no match, no removingThe... (3 Replies)
Discussion started by: sdf
3 Replies
10. Shell Programming and Scripting
Within my text file i have several thousand lines of text with some lines containing duplicate strings/words. I would like to entirely remove those lines which contain the duplicate strings.
Eg;
One and a Two
Unix.com is the Best
This as a Line Line
Example duplicate sentence with the word... (22 Replies)
Discussion started by: martinsmith
22 Replies
bcopy(3) Library Functions Manual bcopy(3)
NAME
bcopy, bcmp, bzero - Perform memory operations
LIBRARY
Standard C Library (libc)
SYNOPSIS
#include <strings.h>
void bcopy(
const void *source,
void *destination,
size_t length);
int bcmp(
const void *string1,
const void *string2,
size_t length);
void bzero(
void *string,
size_t length);
The following function definitions do not conform to current standards and are supported only for backward compatibility:
#include <string.h>
void bcopy(
const char *source,
char *destination,
int length);
int bcmp(
const char *string1,
const char *string2,
int length);
void bzero(
char *string,
int length);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
bcopy(), bcmp(), bzero(): XSH5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Points to the original string for the bcopy() function. Points to the destination string for the bcopy() function. Specifies the byte
string to be compared to the string2 parameter by the bcmp() function. Specifies the byte string to be compared to the string1 parameter
by the bcmp() function. Specifies the length (in bytes) of the string.
DESCRIPTION
The bcopy(), bcmp(), and bzero() functions operate on variable length strings of bytes. Unlike the string functions, they do not check for
null bytes.
The bcopy() function copies the value of the length parameter in bytes from the string in the source parameter to the string in the desti-
nation parameter.
The bcmp() function compares the byte string in the string1 parameter against the byte string of the string2 parameter, returning a 0
(zero) value if the two strings are identical and a nonzero value otherwise.
The bzero() function nulls the string in the string parameter, for the value of the length parameter in bytes.
NOTES
[Tru64 UNIX] The bcopy() function is similar to the memcpy() function except that the first two parameters are reversed.
RELATED INFORMATION
Functions: memccpy(3), memcpy(3), string(3), swab(3)
Standards: standards(5) delim off
bcopy(3)