04-22-2010
Need Shell Script to delete lines in a file
Hi All,
I have a file with 3 columns (Bank Name, Account Number and Amount). My requirement, I need to delete lines using Unix Shell script:
1. Which are having Alphanumeric characters in Account Number (eg. Line3).
2. Which are having 0.00 in amount. (eg. Line4)
3. And also I need to delete the text "End Of File".
Sample Data:-
--------------
Bank1,123,100.00
Bank2,456,200.00
Bank3,A789,300.00
Bank4,1011,0.00
End of File
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to delete all the lines out a file from a unix script. Please help
Platform is Sun (3 Replies)
Discussion started by: alnita
3 Replies
2. Shell Programming and Scripting
Need some help here.
We FTP out files to another server hourly. But before we can FTP to the other server. That server should send our server a "confirmation file" to tell us that they're ready to receive data. If they don't send the confirmation file, the files on our server should just stay... (5 Replies)
Discussion started by: r3edi
5 Replies
3. Shell Programming and Scripting
Hi,
I am a newbie to shell scripting, and I have a file which quite large which I would like to delete lines at certain places. I want to search for a keyword which is recurring in the file. When matched I would like to delete the line. And when the file was so huge I thought I ought to learn... (3 Replies)
Discussion started by: mr_andrew
3 Replies
4. Shell Programming and Scripting
Hi Experts,
I have a file in the below given format. First two lines are header and Trailer. Rest all are transaction Lines. I have to delete all other lines except first line (Header) and lines which contains 5000 in 1st column and 0 in 5th column.
Can anyone please kindly provide me with... (6 Replies)
Discussion started by: phani333
6 Replies
5. Shell Programming and Scripting
Hi Experts,
I have a file format as mentioned below. I would like to have unix script (HP Unix) which can:
1. Remove first 6 and last 3 lines.
2. Delete the lines where 3rd column having Alpha Numeric Number
3. Delete the lines where 4th column having 0.00
4. Calculate the sum of all the... (16 Replies)
Discussion started by: phani333
16 Replies
6. Shell Programming and Scripting
it will grep for a line and then delete these line. how do i begin to write this script if theres no available one? (3 Replies)
Discussion started by: garfish
3 Replies
7. Shell Programming and Scripting
File
6 dbnawldb010-b office Memphis_Corp_SQL_Diff Memphis-Corp-SQL-Inc-Application-Backup 03/09/11 03:24:04
42 luigi-b IPNRemitDB Memphis_Corp_SQL_Diff Memphis-Corp-SQL-Inc-Application-Backup 03/10/11 00:41:36
6 ebs-sqldev1-b IPNTracking Memphis_Corp_SQL_Diff... (4 Replies)
Discussion started by: ajiwww
4 Replies
8. Shell Programming and Scripting
Hi
Iam having file like below
10.238.52.65 pun-ras-bng-mhs-01 server
10.238.52.65 pun-ras-bng-mhs-01 10.10.10.10
10.238.52.65 pun-ras-bng-mhs-01 10.10.20.10
10.238.54.1 enk-ras-bng-cse-01 server
10.238.54.1 enk-ras-bng-cse-01 10.10.30.10
10.238.54.1 enk-ras-bng-cse-01 10.10.10.10
... (5 Replies)
Discussion started by: surender reddy
5 Replies
9. Shell Programming and Scripting
Hi
I have a text file like below. THe content of the text will vary.
Entire text file have four consecutive lines followed with blank line.
I want to delete the occurrence of the two consicutive lines in the text file. I don't have pattern to match and delete. Just i need to delete all... (5 Replies)
Discussion started by: RJSKR28
5 Replies
10. Shell Programming and Scripting
POLY_STATS
{
EqName 103_tri
Id 123
act_polyCount 1
act_polyValue 0
}
POLY_STATS
{
EqName 103_tri
Id 123
pass_polyCount 2
pass_polyValue 0
}
POLY_STATS
{
EqName 103
Id 123
mes_polyCount 2
mes_polyValue 0 (5 Replies)
Discussion started by: Jag02
5 Replies
LEARN ABOUT OSX
ppi::statement::end
PPI::Statement::End(3) User Contributed Perl Documentation PPI::Statement::End(3)
NAME
PPI::Statement::End - Content after the __END__ of a module
SYNOPSIS
# This is normal content
__END__
This is part of an PPI::Statement::End statement
=pod
This is not part of the ::End statement, it's POD
=cut
This is another PPI::Statement::End statement
INHERITANCE
PPI::Statement::End
isa PPI::Statement
isa PPI::Node
isa PPI::Element
DESCRIPTION
"PPI::Statement::End" is a utility class designed to serve as a contained for all of the content after the __END__ tag in a file.
It doesn't cover the ENTIRE of the __END__ section, and can be interspersed with PPI::Token::Pod tokens.
METHODS
"PPI::Statement::End" has no additional methods beyond the default ones provided by PPI::Statement, PPI::Node and PPI::Element.
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.2 2011-02-25 PPI::Statement::End(3)