Hi! Everyone,
Say this file1
--------------
line 1 51610183 420001010 0010CTCTLEDPPOO 2151610183
line 2 2151610183 420001010 0030A2TH2
line 3 2151610183 420001010 0040A2TH3
line 4 2151610183 420001010 ... (0 Replies)
My input:
File_1:
2000_t
g1110.b1
abb.1
2001_t
g1111.b1
abb.2
abb.2
g1112.b1
abb.3
2002_t
.
.
File_2:
2000_t Ali england 135
abb.1 Zoe british 150
2001_t Ali england 305
g1111.b1 Lucy russia 126 (6 Replies)
In Unix, how do I delete lines in a file that match a particular pattern without opening it. File contents are
foo line1
misc
whatever
foo line 2
i want to delete all lines that have the pattern "foo" without opening the file. File should eventually contain
misc
whatever (1 Reply)
BASH in Solaris 10
I have a log file like below. Whenever the pattern ORA-39083 is encountered, I want to delete the line which has this pattern and 3 lines below it.
$ cat someLogfile.txt
ORA-39083: Object type OBJECT_GRANT failed to create with error:
ORA-01917: user or role 'CMPA' does... (4 Replies)
Not Sure how to do this. Some combo of awk and sed perhaps. If String in File1 match String in file2 then append file2
File1.txt
BullTerrier
Boxer
Bulldog
File2.txt
<Defined info="AllAnimals" group="Adoptions" setting="animals">
<SomeID ="NumbersRepresentingDogName">
<for>
<add... (2 Replies)
Not clear how to do so. Looking to append the 1st match of said pattern with 'OK TO REMOVE'
file containing patter
File1.txt
RMS_QUANTITY_RT
SMS_QUANTITY_RT
file to search
File2.txt
<!-- dec=664, SMS_QUANTITY_RT -->
<!-- dec=664, RMS_QUANTITY_RT -->
Projected Results
<!--... (3 Replies)
In the below file I am trying to grep or similar, all lines where only AF= is less than 0.4.. Thank you :).
grep
grep "AF=" ,+ .4 file
file
12 112036782 . T C 34.0248 PASS ... (3 Replies)
In the awk, thanks you @RavinderSingh13, for the help in below, hopefully it is close as I am trying to update the value in $12 of the tab-delimeted file2 with the matching value in $1 of the space delimeted file1. I have added comments for each line as well. Thank you :).
awk
awk '$12 ==... (10 Replies)
Hi All-I am new to Unix , I need to write a script. Can someone help me with a requirement where I have list of files in a directory, I want to Merge the files if a pattern of string matches in filenames?
AAAL_555A_ORANGE1_F190404.TXT
AAAL_555A_ORANGE2_F190404.TXT
AAAL_555A_ORANGE3_F190404.TXT... (6 Replies)
Discussion started by: Shankar455
6 Replies
LEARN ABOUT OSF1
pnmcrop
pnmcrop(1) General Commands Manual pnmcrop(1)NAME
pnmcrop - crop a portable anymap
SYNOPSIS
pnmcrop [-white|-black|-sides] [-left] [-right] [-top] [-bottom] [pnmfile]
All options may be abbreviated to their shortest unique prefix or specified with double hyphens.
DESCRIPTION
Reads a PBM, PGM, or PPM image as input. Removes borders that are the background color, and produces the same type of image as output.
If you don't specify otherwise, pnmcrop assumes the background color is whatever color the top left and right corners of the image are and
if they are different colors, something midway between them. You can specify that the background is white or black with the -white and
-black options or make pnmcrop base its guess on all four corners instead of just two with -sides.
By default, pnmcrop chops off any stripe of background color it finds, on all four sides. You can tell pnmcrop to remove only specific
borders with the -left, -right, -top, and -bottom options.
If you want to chop a specific amount off the side of an image, use pnmcut.
If you want to add different borders after removing the existing ones, use pnmcat or pnmcomp.
OPTIONS -white Take white to be the background color. pnmcrop removes borders which are white.
-black Take black to be the background color. pnmcrop removes borders which are black.
-sides Determine the background color from the colors of the four corners of the input image. pnmcrop removes borders which are of the
background color.
If at least three of the four corners are the same color, pnmcrop takes that as the background color. If not, pnmcrop looks for two
corners of the same color in the following order, taking the first found as the background color: top, left, right, bottom. If all
four corners are different colors, pnmcrop assumes an average of the four colors as the background color.
The -sides option slows pnmcrop down, as it reads the entire image to determine the background color in addition to the up to three
times that it would read it without -sides.
-left Remove any left border.
-right Remove any right border.
-top Remove any top border.
-bottom
Remove any bottom border.
-verbose
Print on Standard Error information about the processing, including exactly how much is being cropped off of which sides.
SEE ALSO pnmcut(1), pnmfile(1), pnm(5)AUTHOR
Copyright (C) 1989 by Jef Poskanzer.
18 March 2001 pnmcrop(1)