07-27-2005
mass delete a certain string in a .log file
Hey all. I have a file that has roughly 115,000 lines in it. There are a few lines of information that I don't want in it, but I don't want to search through all of the lines to find the ones that I don't want. Is there a way to do a mass delete of the lines that I don't want?
Thanks for the help.
10 More Discussions You Might Find Interesting
1. AIX
Is it possible in VI to do a global change but take the search patterns and the replacement patterns from an external file ?
I have cases where I can have 100,200 or 300+ global changes to do. All the new records are inside a file and I must VI a work file to change all of them.
Also, can... (1 Reply)
Discussion started by: Browser_ice
1 Replies
2. Shell Programming and Scripting
Hi Experts,
I have several big size file arround 900 MB. From the file I need to delete some common strings but without opening the file. here is example- in file
<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>
<LogItems>
<log logid="8423b5ae190810252359350480/1/1/1">
... (6 Replies)
Discussion started by: thepurple
6 Replies
3. Shell Programming and Scripting
I have a control file which looks like this
LOAD DATA
INFILE '/array/data/data_Finished_T5_col_change/home/oracle/emp.dat'
PRESERVE BLANKS
INTO TABLE SCOTT.EMP
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(.................
..................)
How can i edit the... (1 Reply)
Discussion started by: mwrg
1 Replies
4. Shell Programming and Scripting
If a log file is in the following format
28-Jul-10 ::: Log message
28-Jul-10 ::: Log message
29-Jul-10 ::: Log message
30-Jul-10 ::: Log message
31-Jul-10 ::: Log message
31-Jul-10 ::: Log message
1-Aug-10 ::: Log message
1-Aug-10 ::: Log message
2-Aug-10 ::: Log message
2-Aug-10 :::... (3 Replies)
Discussion started by: vikram3.r
3 Replies
5. Shell Programming and Scripting
awk '!(/^$/||/--/||/selected/||/^ *$/){print "A." $1 " <> B." $1 " or"}' infile
my AWK out put is :
A.KZ <> B.KZ or
A.KZT <> B.KZT or
A.KZ_Z <> B.KZ_Z or
A.LH <> B.LH or
A.MAN<> B.MAN or
A.OBJEKT <> B.OBJECT or
A.PAK <> B.PAK ;
is there any way to controle AWK to not print the... (1 Reply)
Discussion started by: kanakaraju
1 Replies
6. Shell Programming and Scripting
Hi,
1_strings file contains
$ cat 1_strings
/home/$USER/Src
/home/Valid
/home/Review$ cat myxml
<projected value="some string" path="/home/$USER/Src">
<input 1/>
<estimate value/>
<somestring/>
</projected>
<few more lines >
<projected value="some string" path="/home/$USER/check">... (4 Replies)
Discussion started by: greet_sed
4 Replies
7. UNIX for Dummies Questions & Answers
Hi , I am breaking my head from past one day ...to delete lines from a file which match to the string pattern.:wall:
I am storing the search string in a variable and search if the file exists in the folder,if not delete that entry from the file.
I am having problem to delete that line from... (2 Replies)
Discussion started by: rashmisb
2 Replies
8. Shell Programming and Scripting
Hi all
i want to write program with shell script that able compare two file content and if one of lines of file have # at the first of string or nothing find same string in one of two file . remove the line in second file that have not the string in first file. for example:
file... (2 Replies)
Discussion started by: saleh67
2 Replies
9. Red Hat
ENVIROMENT
Linux: Fedora Core release 1 (Yarrow)
iPlanet: iPlanet-WebServer-Enterprise/6.0SP1
Log Path: /usr/iplanet/servers/https-company/logs
I have iPlanet log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I... (7 Replies)
Discussion started by: zachs
7 Replies
10. UNIX for Dummies Questions & Answers
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
FIXPS(1) FSF FIXPS(1)
NAME
fixps - sanitize PostScript files
SYNOPSIS
fixps [OPTIONS] FILE
DESCRIPTION
Try to fix common PostScript problems that break postprocessing.
OPTIONS
-h, --help
display this help and exit
-v, --version
display version information and exit
-q, --quiet
don't print informational messages
-o, --output=FILE
save result in FILE. If FILE is `-', send to stdout
-f, --force
force full rewrite by ghostscript
-n, --no-fix
don't fix the FILE, but still honor `-o'
-c, --check, --dry-run
don't perform any action
Fixes:
- Remove junk before and after PostScript content - Use only Unix end of lines (
)
- Remove empty lines - Fix Apple prologue (fixmacps) - Fix FrameMaker prologue (fixfmps) - Fix CorelDraw prologue (fixnt) - Fix Win-
dows NT 3.5/4.0 prologue (fixnt) - Fix Windows 95 prologue - Ensure there is a `%%BeginSetup/%%EndSetup' section - Removes Canvas'
extraneaous `%%EndDocument:' comments - Split too long lines
If the FILE seems really in a bad state, ghostscript may be used to perform a full rewrite. The output might then be significantly bigger,
but much safer.
AUTHOR
Written by Akim Demaille.
REPORTING BUGS
Report bugs to <bug-a2ps@gnu.org>
COPYRIGHT
Copyright (C) 1998-2000 Akim Demaille, Miguel Santana
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
a2ps(1), card(1), fixps(1), pdiff(1), psset(1), texi2dvi4a2ps(1).
The full documentation for fixps is maintained as a Texinfo manual. If the info and fixps programs are properly installed at your site,
the command
info fixps
should give you access to the complete manual.
fixps 1.5 (GNU a2ps 4.14) March 2014 FIXPS(1)