Sponsored Content
Top Forums Shell Programming and Scripting How to remove certain lines in multiple txt files? Post 302257753 by olloong on Thursday 13th of November 2008 02:56:50 AM
Old 11-13-2008
Question How to remove certain lines in multiple txt files?

Hi ,

I have this type of files:-

BGH.28OCT2008.00000001.433155.001
BGH.28OCT2008.00000002.1552361.001
BGH.28OCT2008.00000003.1438355.001
BGH.28OCT2008.00000004.1562602.001

Inside them contains the below:

5Discounts
6P150 - Max Total Usage RM150|-221.00
P150 EPP - Talktime RM150 x 24|-169.35
7-390.35
90.00
812.71
3ITEMISED|YES
4DOMESTIC
5Calls
Calls
Calls
Calls
Calls
Calls
Calls
Calls
Calls
.
.
.
5Discounts
6P150 - Max Total Usage RM150|-221.00
P150 EPP - Talktime RM150 x 24|-169.35
7-390.35
90.00
812.71
3ITEMISED|YES
4DOMESTIC
5Calls
Calls
Calls
Calls
Calls
Calls
Calls
Calls
Calls
.
.
.

How do I get those line in green deleted as i do not know when is the last 'calls' line?
And how do I loop to remove those lines in all the txt files?

Anyone can help?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need help--script to filter specific lines from multiple txt files

Hi folks, - I have 800 txt files - those files are cisco router configs router1.txt router2.txt ... router800.txt I want to accomplish the following: - I want to have a seperate file with all the filenames that I want to process - I want a script that goes trough all those... (7 Replies)
Discussion started by: I-1
7 Replies

2. UNIX for Dummies Questions & Answers

Compare and Remove duplicate lines from txt

Hello, I am a total linux newbie and I can't seem to find a solution to this little problem. I have two text files with a huge list of URLS. Let's call them file1.txt and file2.txt What I want to do is grab an URL from file2.txt, search file1.txt for the URL and if found, delete it from... (11 Replies)
Discussion started by: rmarcano
11 Replies

3. Shell Programming and Scripting

Number of *.txt files which have over n lines?

Can you help me please? I know that wc -l *.txt gives you the number of lines in each file. But how can i count the files that have over n lines? (4 Replies)
Discussion started by: dark_knight
4 Replies

4. UNIX for Dummies Questions & Answers

How to remove characters from multiple .txt files

Friends, I want to remove charecters from multiple .txt files. Foe example : In this .txt files there are many "ctrl m" present in last of each line in one .txt file. I want to remove "ctrl m" from each line from all .txt files. Need your help regarding this. (4 Replies)
Discussion started by: meetsubhas
4 Replies

5. Shell Programming and Scripting

replace a string with contents of a txt file containing multiple lines of strings

Hello everyone, ive been trying to replace a string "kw01" in an xml file with the contents of a txt file having multiple lines. im a unix newbie and all the sed combinations i tried resulted to being garbled. Below is the contents of the txt file: RAISEDATTIME --------------------... (13 Replies)
Discussion started by: 4dirk1
13 Replies

6. Shell Programming and Scripting

merging two .txt files by alternating x lines from file 1 and y lines from file2

Hi everyone, I have two files (A and B) and want to combine them to one by always taking 10 rows from file A and subsequently 6 lines from file B. This process shall be repeated 40 times (file A = 400 lines; file B = 240 lines). Does anybody have an idea how to do that using perl, awk or sed?... (6 Replies)
Discussion started by: ink_LE
6 Replies

7. UNIX for Advanced & Expert Users

How to remove degree symbol from the TXT files?

I have TXT files to process but they contain the degree symbols in them due to which the processing program fails on these files. I want a unix command that will remove the degree symbols from these files. I tried using the sed command: sed 's///g' filename but it did not work. This issue... (14 Replies)
Discussion started by: khedu
14 Replies

8. UNIX for Dummies Questions & Answers

redirecting arguments in a script to multiple lines in a .txt file

Ok hope my vocab is right here, i'm trying to write multiple sets of arguments to another file for example: I have a script that accepts four arguments and sends them to a another file $write.sh it then out in so the file receiver.txt would contain this: it then out in what... (2 Replies)
Discussion started by: austing5
2 Replies

9. UNIX for Dummies Questions & Answers

Need help combining txt files w/ multiple lines into csv single cell - also need data merge

:confused:Hello -- i just joined the forums. I am a complete noob -- only about 1 week into learning how to program anything... and starting with linux. I am working in Linux terminal. I have a folder with a bunch of txt files. Each file has several lines of html code. I want to combine... (2 Replies)
Discussion started by: jetsetter
2 Replies

10. UNIX for Advanced & Expert Users

To Remove multiple new lines

Hi , I have file which consists of multiple new lines. I need to identify the new line in every row of the file and remove it. It is having record delimiter as "|" and final delimiter of the line is "end" Can anyone from the forum suggest me how to remove the news lines from entire file? example... (11 Replies)
Discussion started by: etldeveloper
11 Replies
ALE(1)                                                                                                                                      ALE(1)

NAME
ale - a synthetic capture engine and renderer SYNOPSIS
ale [OPTIONS] original-frame [supplemental-frames ...] output-file ale [HELP OPTIONS] ale --version DESCRIPTION
ALE is a free software synthetic capture engine and renderer accepting, as input, a sequence of image frames, and producing, as output, rendered images, registration data, and 3D models (currently experimental). EXAMPLES
ale --hu Print the help page on program usage. ale 001.ppm 002.ppm 003.ppm out.ppm Render output file out.ppm from inputs 001.ppm, 002.ppm, and 003.ppm. ale --scale 2 001.ppm 002.ppm 003.ppm out.png Render output file out.png at 2x scale. ale --perturb-upper=0 --trans-load=a.t --projective frame*.png out.png Render output file out.png from inputs frame*.png, using projective transformations as described in the file a.t. ale --3dv 0 out.png --projective frame*.png null: Render output file out.png from inputs frame*.png, using a 3D scene model to determine transformations. ale --visp last:sinc*lanc:6 sf:0 out/ .jpg in/*.jpg null: Render a video stream from files in/*.jpg to the directory out/, stabilizing to the first frame, with a lanczos-windowed sinc filter. USAGE
ale is a wrapper script that calls the executable ale-bin after extracting exposure EXIF information from image files (when the exiftool utility is available) and converting from raw formats (when the dcraw utility is available). When ale-bin has been linked with ImageMagick, input and output files may be of any kind supported by ImageMagick. Otherwise, only PPM files can be read and written by ale-bin. OPTIONS
OPTIONS are summarized via built-in help pages (see HELP OPTIONS below). More detailed manuals describing options and internal algorithms are available for certain versions of ALE. See SEE ALSO below for more details on other manuals. HELP OPTIONS
A listing of available help options can be obtained by invoking ale --hu. ENVIRONMENT
The wrapper script ale recognizes the following environment variables: ALE_BIN ALE executable to use. DCRAW dcraw raw extraction tool to use. EXIF_UTILITY EXIF extraction utility to use. ALE_COUNT_THREADS Displays statistics on thread counts when set to a non-zero value. PAGER Text pager to use (e.g., for displaying help pages). SEE ALSO
More detailed manuals for certain versions of ALE are distributed with source packages, and may also be available from: http://auricle.dyndns.org/ALE/manuals/ 03/31/2009 ALE(1)
All times are GMT -4. The time now is 05:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy