Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Appending 2 files skipping the header of the second file Post 302555389 by Corona688 on Wednesday 14th of September 2011 03:29:58 PM
Old 09-14-2011
If the header is 5 lines:
Code:
( cat file1 ; tail -n +6 file2 ) >> file3

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed skipping the last line in a file

Hello All, I have a file like this: PART A1 PART A2 % PART B1 PART B2 The last line in the file (PART B2) does not end with a new line. i.e <EOF> immediately follows "PART B2". Here is my problem: I want to print everything after '%'. So, I tried: sed '1,/%/ d' . This works... (6 Replies)
Discussion started by: aghoras
6 Replies

2. Shell Programming and Scripting

Compare EDI files by skipping selected Segments

Hi, I wanted to compare EDI files present in Two different Directories which can be related by the file names. While comparing the EDI files i have to skip selected segments such as "ISA" "IEA" and "GS" "GE" since this may have datetime stamp and different "Sender" "Receiver" Qual. and... (3 Replies)
Discussion started by: Sivas
3 Replies

3. 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

4. UNIX for Advanced & Expert Users

Appending a files contents to the end of a specific file name in several directories

Here is my dir structure: /tmp/dave/myappend.txt /tmp/dave/dir1/test.txt /tmp/dave/dir2/test.txt /tmp/dave/dir3/test.txt /tmp/dave/dir4/test.txt I want to append the contents of myappend.txt to the end of each file with the name "test.txt" in all dirs in /tmp/dave/ I have tried this:... (2 Replies)
Discussion started by: bigd213
2 Replies

5. Shell Programming and Scripting

Move only folders and skipping files

How do I move all folders and its contents from a directory A to another directory B, skipping all files in Directory A ? ---------- Post updated at 12:53 PM ---------- Previous update was at 12:42 PM ---------- Ok. Got it. mv /A/*/ /B/ (1 Reply)
Discussion started by: DHeisenberg
1 Replies

6. Shell Programming and Scripting

Cp & skipping exiting files

// Redhat I am running a cron with cp every 15 minutes. cp /p2/arch/log/* /p2/bkp What I need is to not to copy the file again if the filename already exists under /p2/bkp The reason is that the file size under /p2/arch/log/ will be reduced (contents truncated), so I need to keep the... (10 Replies)
Discussion started by: Daniel Gate
10 Replies

7. Shell Programming and Scripting

Match in awk skipping header rows

I am trying to match $1-$7 between the two files and if a match is found then the contents of $8 in file2 and copied over. The awk I tried is below. There is also a header row in file2 that has the Chr Start End Ref Alt that does not need to be searched. Thank you :). awk awk... (3 Replies)
Discussion started by: cmccabe
3 Replies

8. Shell Programming and Scripting

Copying multiple files and appending time stamp before file extension

Hi, I have multiple files that read: Asa.txt Bad.txt Gnu.txt And I want to rename them using awk to Asa_ddmmyytt.txt and so on ... If there is a single command or more efficient executable please share! Thanks! (4 Replies)
Discussion started by: Jesshelle David
4 Replies

9. UNIX for Beginners Questions & Answers

Renaming files by appending string from within file to filename

Greetings. I am working in a Linux environment and am trying to figure out a way to rename files in a directory by appending a unique strings that appears within a certain area in those files. I have gotten as far as identifying what that particular unique string is with a command like the... (10 Replies)
Discussion started by: HLee1981
10 Replies

10. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
Dt/Help.h(file formats) 												   Dt/Help.h(file formats)

NAME
Dt/Help.h -- help services definitions SYNOPSIS
#include <Dt/Help.h> DESCRIPTION
The Dt/Help.h header defines the variables and function prototypes for help services. The header defines the following DtHelpDialogCallbackStruct windowHint constants: DtHELP_POPUP_WINDOW DtHELP_CURRENT_WINDOW DtHELP_NEW_WINDOW The header defines the following DtHelpDialogCallbackStruct hyperType constants: DtHELP_LINK_JUMP_NEW DtHELP_LINK_TOPIC DtHELP_LINK_MAN_PAGE DtHELP_LINK_APP_DEFINE DtHELP_LINK_TEXT_FILE The header defines the following DtHelpDialogCallbackStruct reason constants: DtCR_HELP_LINK_ACTIVATE DtCR_HELP_CLOSE DtCR_HELP_HELP The header defines the following DtNScrollBarPolicy constants: DtHELP_NO_SCROLLBARS DtHELP_STATIC_SCROLLBARS DtHELP_AS_NEEDED_SCROLLBARS The header defines the following DtNhelpType constants: DtHELP_TYPE_TOPIC DtHELP_TYPE_STRING DtHELP_TYPE_MAN_PAGE DtHELP_TYPE_FILE DtHELP_TYPE_DYNAMIC_STRING The header defines the following DtNpaperSize constants: DtHELP_PAPERSIZE_LETTER DtHELP_PAPERSIZE_LEGAL DtHELP_PAPERSIZE_EXECUTIVE DtHELP_PAPERSIZE_A4 DtHELP_PAPERSIZE_B5 The header defines the following DtHelpQuickDialogGetChild constants: DtHELP_QUICK_CLOSE_BUTTON DtHELP_QUICK_PRINT_BUTTON DtHELP_QUICK_HELP_BUTTON DtHELP_QUICK_SEPARATOR DtHELP_QUICK_MORE_BUTTON DtHELP_QUICK_BACK_BUTTON The header defines the following DtHelpReturnSelectedWidgetId constants: DtHELP_SELECT_ERROR DtHELP_SELECT_VALID DtHELP_SELECT_ABORT DtHELP_SELECT_INVALID The header declares the following as functions: void DtHelpSetCatalogName(char *catFile); int DtHelpReturnSelectedWidgetId(Widget parent, Cursor cursor, Widget *widget); SEE ALSO
Dt/HelpDialog.h - DtHelpDialog(5), Dt/HelpQuickD.h - DtHelpQuickD(5), DtCreateHelpQuickDialog(3), DtCreateHelpDialog(3), DtHelpSetCatalog- Name(3), DtHelpReturnSelectedWidgetId(3), DtHelpDialog(3), DtHelpQuickDialog(3). Dt/Help.h(file formats)
All times are GMT -4. The time now is 06:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy