Sponsored Content
Top Forums Shell Programming and Scripting Exclude the header row in the file to validate Post 302692057 by bmk on Monday 27th of August 2012 03:24:56 AM
Old 08-27-2012
Exclude the header row in the file to validate

Hi All,

File contains header row.. we need to exclude the header row...no need to validate the first row in the file.
Data in the file should take valid data(two columns)..we need to exclude the more than two columns in the file except the first line.
Code:
email|firstname
a|123|100
b|345
c|456|123|123
d|456
e    456

i need output for the file..
Code:
 email|firstname
b|345
d|456

Thanks,
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Merge all csv files in one folder considering only 1 header row and ignoring header of all others

Friends, I need help with the following in UNIX. Merge all csv files in one folder considering only 1 header row and ignoring header of all other files. FYI - All files are in same format and contains same headers. Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies

2. Shell Programming and Scripting

Script to validate file header and trailer

Hi, I need a script that validates a file header/detail/trailer. File layout is: Header - Rec_Type|File_name|File_Date Detail - Rec_Type|field1|field2|field3... Trailder - Rec_Type|File_name|File_Date|Record_count Sample Data: HDR|customer_data.dat|20120709... (7 Replies)
Discussion started by: ash_sh
7 Replies

3. UNIX for Dummies Questions & Answers

append column and row header to a file in awk script.

Hi! Is there a way to append column and row header to a file in awk script. For example if I have Jane F 39 manager Carlos M 40 system administrator Sam F 20 programmer and I want it to be # name gend age occup 1 Jane F 39 manager 2 Carlos M ... (4 Replies)
Discussion started by: FUTURE_EINSTEIN
4 Replies

4. Shell Programming and Scripting

Test command:Duplicate Header row in Log File

I have a script that is inventorying (not sure if thats a word) my environment. It goes out and pulls Hostname OS, IP, and ENV (dev, prod, etc)..then spits all that to a logfile At the top of my script i have a check to see if the logfile exist. ] || touch $LOGFILE && echo "ENV" "\t"... (3 Replies)
Discussion started by: nitrobass24
3 Replies

5. Shell Programming and Scripting

Add column header and row header

Hi, I have an input like this 1 2 3 4 2 3 4 5 4 5 6 7 I would like to count the no. of columns and print a header with a prefix "Col". I would also like to count the no. of rows and print as first column with each line number with a prefix "Row" So, my output would be ... (2 Replies)
Discussion started by: jacobs.smith
2 Replies

6. UNIX for Dummies Questions & Answers

File Row Line Count without Header Footer

Hi There! I am saving the file count of all files in a directory to an output file using: wc -l * > FileCount.txt I get: 114 G4SXORD 3 G4SXORH 0 G4SXORP 117 total But this count includes header and footer. I want to subtract 2 from the count and get ... (7 Replies)
Discussion started by: gagan8877
7 Replies

7. Shell Programming and Scripting

Exclude the header row while splitting the file

Hi All, i have script like ... "TYPE_ID" "ID" "LIST_ID" "18" "52010" "1059" "18" "52010" "1059" "18" "52010" "1059" "18" "52010" "1059" i am using the below code it's not taking the header row. awk -F"\t" -v file=test1.txt -v file1=test2.txt ' { if(... (7 Replies)
Discussion started by: bmk
7 Replies

8. Shell Programming and Scripting

How to display the header of a matched row in a file?

Hi, So I am trying to print the first row(header) first column alongwith the matched value. But I am not sure how do I print the same, by matching a pattern located in the file eg File contents Name Place Jim NY Jill NJ Cathy CA Sam TX Daniel FL And what I want is... (2 Replies)
Discussion started by: sidnow
2 Replies

9. Shell Programming and Scripting

Bash to verify and validate file header and data type

The below bash is a file validation check executed that will verify the correct header count of 10 and the correct data type in each field of the tab-delimited file. The key has the data type of each field in it. My real data has 58 headers in it but only the header and next row need to be... (6 Replies)
Discussion started by: cmccabe
6 Replies

10. Shell Programming and Scripting

Script to validate header in a csv file

Hi All; I am struggling to write a script that validates file header. Header file would be like below with TAB separated TRX # TYPE REF # Source Piece Code Destination Piece Code every time I need to check the txt file if the header was same as above fields if validation success... (6 Replies)
Discussion started by: heye18
6 Replies
STROKES(5)							File Formats Manual							STROKES(5)

NAME
Strokes - X(1) action invocation with simple mouse movements DESCRIPTION
What are strokes? Simply put, they are a method to invoke program actions with mouse drags. They are defined by the following grid: 1 2 3 4 5 6 7 8 9 Stroke 456 is the horizontal movement from left to right with the stroke button pressed. Holding down the stroke button and tracing out the letter `C' would be stroke 3214789. Simple, right? The Stroke library allows you to add strokes to any X(1) program with one simple function call, StrokeInstall(3). For example: W = XmCreateMessageDialog(Parent, "StrokeEnabledDialog", NULL, 0); StrokeInstall(W); will enable strokes in the dialog W. When a stroke is entered the action corresponding to the stroke is called. For the above example the action `Stroke-456' would be called when `456 is stroked'. In order to specify a different action you can specify this with the `strokes' resource for the Widget that the strokes have been installed in. So `*StrokeEnabledDialog.strokes: 456 ManagerGadgetSelect' would call the ManagerGadgetSelect action of the message dialog when 456 is stroked. The exact syntax is: Resource.strokes: stroke action [[,stroke action]...] Resources strokes: stroke action [[,stroke action]...] This provides a mapping of strokes to actions. By default the action `Stroke-456' is called for stroke `456'. strokeSlop: int This is used to define a buffer zone between the boxes of the grid. The amount of slop tolerated is actually the resulting box dimension divided by this slop number. Therefore the larger the slop number the more accurate your strokes must be. A value approaching 3 will make it all but impossible to recognize a stroke. The default value is currently 20. Run the stroke(1) program with StrokeDebug turned on to show what this means. strokeDebug: True | False Turns on `stroke debug mode'. In this mode the strokes are not erased from the screen when the button is released and a grid is drawn around the stroke. Try the stroke(1) program to see what I mean. strokeButton: 1 | 2 | 3 | 4 | 5 Specifies the button to be used to draw strokes. By default Btn3 is used. strokeSound: sound file If given, the contents of this resource will be provided as an argument to the `PlaySound' action at the conclusion of the stroke. If the PlaySound action is not defined in your application do not specify this resource. Specifically the following call is made: XtCallActionProc(W, "PlaySound", NULL, "sound file", 1); AUTHOR
Rick Scott <rwscott@alumni.uwaterloo.ca> Check out LessTif at http://www.LessTif.org SEE ALSO
stroke(1) StrokeInstall(3) StrokeRemove(3) StrokeSetButton(3) StrokeGetButton(3) StrokeSetDebug(3) StrokeGetDebug(3) StrokeSetMapping(3) StrokeGetMapping(3) STROKES(5)
All times are GMT -4. The time now is 01:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy