Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Remove footer record in specific condition Post 303009236 by KK230689 on Monday 11th of December 2017 09:16:37 AM
Old 12-11-2017
If values other than JE are at the start of records that need to be removed, how are those records identified?

Do you always want to remove every line that starts with a J?
No, we need to remove footer record which contains comma less than 3 count
Do you always want to remove every line that starts with an uppercase alphabetic character?
No
Do you always want to remove every line that starts with a character that is not a numeric character?
No
Do you always want to remove the last line in every file you process?
No, because some times they are not giving footer record.in such case the actual value get removed.
Do you always want to remove every line that contains exactly two commas?
Yes. but we can apply the condition as less than 3 counts of comma.
What operating system are you using?

Linux uklvaucup01a 2.6.32-696.3.2.el6.x86_64 #1 SMP Wed Jun 7 11:51:39 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
What shell are you using?

Linux uklvaucup01a 2.6.32-696.3.2.el6.x86_64 #1 SMP Wed Jun 7 11:51:39 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
What have you tried to solve this problem on your own?
sorry i haven't any idea to solve this issue.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to Chop Header and Footer record from input file

Hi, I need to chope the header and footer record from an input file and make a new output file, please let me know how i can do it in unix.thanks. (4 Replies)
Discussion started by: coolbudy
4 Replies

2. Shell Programming and Scripting

remove header and footer rows

I would like to remove some lines from begining of file (header) and some lines from end of file (footer). The header/footer lines generated by web-browser when the user upload a file to my webserver. Example: -----------------------------7d62af20c052c Content-Disposition: form-data;... (2 Replies)
Discussion started by: seaky
2 Replies

3. Shell Programming and Scripting

Remove the footer from a flat file by searching a pattern

Hi, I have more than 30,000 records in a flat file. I want to remove footer from the file by searching a string pattern for the footer. Example.... let the flat file test.dat contains below records. record1 record2 record3 .. .. .. record31000 Total records 31000 I want to remove the... (6 Replies)
Discussion started by: gani_85
6 Replies

4. Shell Programming and Scripting

Help with File processing - Adding predefined text to particular record based on condition

I am generating a output: Name Count_1 Count_2 abc 12 12 def 15 14 ghi 16 16 jkl 18 18 mno 7 5 I am sending the output in html email, I want to add the code: <font color="red"> NAME COLUMN record </font> for the Name... (8 Replies)
Discussion started by: karumudi7
8 Replies

5. UNIX for Dummies Questions & Answers

remove the header and footer using sed

I want to delete the header and footer in the file by using sed for that i ran the below script and my text file looks like emp.txt # This file contain employee # information abc 12300 34 'FGH' # This is confidential as per the firm rules. my intention is to remove the header... (8 Replies)
Discussion started by: vmachava
8 Replies

6. Shell Programming and Scripting

Grab unique record from different files on a condition

Hi, I think this is the toughest prob :wall: I have ever come across and I thankfully owe all of u for helping me cross this. cat 1.txt cat 2.txt K now. This is what I am looking for. Output.txt Here is how my output has been generated. First, the column one of each file... (6 Replies)
Discussion started by: jacobs.smith
6 Replies

7. Shell Programming and Scripting

Add header and footer with record count in footer

This is my file(Target.txt) name|age|locaction abc|23|del xyz|24|mum jkl|25|kol The file should be like this 1|03252012 1|name|age|location 2|abc|23|del 2|xyz|24|mum 2|jkl|25|kol 2|kkk|26|hyd 3|4 Column 1 is row indicator for row 1 and 2, column indicator is 1,for data rows... (1 Reply)
Discussion started by: itsranjan
1 Replies

8. Shell Programming and Scripting

[AWK script]Counting the character in record and print them in condition

.......... (1 Reply)
Discussion started by: Antonlee
1 Replies

9. Programming

[solved] how to remove header and footer

it still display header and footer header SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 24 13:41:51 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real... (0 Replies)
Discussion started by: ment0smintz
0 Replies

10. UNIX for Beginners Questions & Answers

Bash to remove find and remove specific extension

The bash below executes and does find all the .bam files in each R_2019 folder. However set -x shows that the .bam extension only gets removed from one .bam file in each folder (appears to be the last in each). Why is it not removing the extension from each (this is $SAMPLE)? Thank you :). set... (4 Replies)
Discussion started by: cmccabe
4 Replies
atos(1) 						    BSD General Commands Manual 						   atos(1)

NAME
atos -- convert numeric addresses to symbols of binary images or processes SYNOPSIS
atos [-o <binary-image-file>] [-p <pid> | <partial-executable-name>] [-arch architecture] [-l <load-address>] [-s <slide>] [-printHeader] [-f <address-input-file>] [<address> ...] DESCRIPTION
The atos command converts numeric addresses to their symbolic equivalents. If full debug symbol information is available, for example in a .app.dSYM sitting beside a .app, then the output of atos will include file name and source line number information. The input addresses may be given in one of three ways: 1. A list of addresses at the end of the argument list. 2. Using the -f <address-input-file> argument to specify the path of an input file containing whitespace-separated numeric addresses. 3. If no addresses were directly specified, atos enters an interactive mode, reading addresses from stdin. The symbols are found in either a binary image file or in a currently executing process, as specified by: -o <binary-image-file> The path to a binary image file in which to look up symbols. -p <pid> | <partial-executable-name> The process ID or the partial name of a currently executing process in which to look up symbols. Multiple process IDs or paths can be specified if necessary, and the two can be mixed in any order. When working with a Mach-O binary image file, atos considers only addresses and symbols defined in that binary image file, at their default locations (unless the -l or -s option is given). When working with a running process, atos considers addresses and symbols defined in all binary images currently loaded by that process, at their loaded locations. The following additional options are available. -arch architecture The particular architecure of a binary image file in which to look up symbols. -l <load-address> The load address of the binary image. This value is always assumed to be in hex, even without a "0x" prefix. The input addresses are assumed to be in a binary image with that load address. Load addresses for binary images can be found in the Binary Images: sec- tion at the bottom of crash, sample, leaks, and malloc_history reports. -s <slide> The slide value of the binary image -- this is the difference between the load address of a binary image, and the address at which the binary image was built. This slide value is subtracted from the input addresses. It is usually easier to directly specify the load address with the -l argument than to manually calculate a slide value. -printHeader If a process was specified, the first line of atos output should be a header of the form "Looking up symbols in process <pid> named: <process-name>". This is primarily used when atos is invoked as part of a stackshot(1) run, for verification of the process ID and name. EXAMPLE
A stripped, optimized version of Sketch was built as an x86_64 position-independent executable (PIE) into /BuildProducts/Release. Full debug symbol information is available in Sketch.app.dSYM, which sits alongside Sketch.app. When Sketch.app was run, the Sketch binary (which was built at 0x100000000) was loaded at 0x10acde000. Running 'sample Sketch' showed 3 addresses that we want to get symbol information for -- 0x10acea1d3, 0x10ace4bea, and 0x10ace4b7a. First notice that the .dSYM is next to the .app: % ls -1 /BuildProducts/Release/ Sketch.app Sketch.app.dSYM Now, to symbolicate, we run atos with the -o flag specifying the path to the actual Sketch executable (not the .app wrapper), the -arch x86_64 flag, and the -l 0x10acde000 flag to specify the load address. % atos -o /BuildProducts/Release/Sketch.app/Contents/MacOS/Sketch -arch x86_64 -l 0x10acde000 0x10acea1d3 0x10ace4bea 0x10ace4b7a -[SKTGraphicView drawRect:] (in Sketch) (SKTGraphicView.m:445) -[SKTGraphic drawHandlesInView:] (in Sketch) (NSGeometry.h:110) -[SKTGraphic drawHandleInView:atPoint:] (in Sketch) (SKTGraphic.m:490) GETTING SYMBOLS FOR A DIFFERENT MACHINE ARCHITECTURE
It is possible to get symbols for addresses from a different machine architecture than the system on which atos is running. For example, when running atos on an Intel-based system, one may wish to get the symbol for an address that came from a backtrace of a process running on a PowerPC machine. To do so, use the -arch flag to specify the desired architecture (such as i386 or ppc) and pass in a corresponding sym- bol-rich Mach-O binary image file with a binary image of the corresponding architecture (such as a Universal Binary). BSD
January 15, 2010 BSD
All times are GMT -4. The time now is 09:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy