Sponsored Content
Top Forums Shell Programming and Scripting I want Trailer to be added into the text file. Post 302303172 by cfajohnson on Thursday 2nd of April 2009 04:15:50 AM
Old 04-02-2009
Quote:
Originally Posted by Haque123
I want Trailer to be added into the txt file the format is below.

flatfile-> abc.txt

count of the file is 500 records.

I want the trailer in this format: TRAILER|500 (pipe delimeter).
Code:
printf "%s\n" "TRAILER|500" >> abc.txt

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Removing trailer from a flat file!!!

Hi, I get some flat files with trailer which gives the totol records count and i want to remove the trailer from the file. i used the following command it works fine with a single file. cat file_name | grep -v 'Total records:' > file1 mv file file_name But i dont know how to remove the... (12 Replies)
Discussion started by: kumarsaravana_s
12 Replies

2. Shell Programming and Scripting

Get the latest added part of a text file?

Hi, I want to get the latest added part of a text file sent over the network to for analysis. Is there a tool to use to keep track of which part of a text file that has already been analysed so only the "new" lines will be sent and handled? I have checked a few tools but I still donīt know how to... (3 Replies)
Discussion started by: pcrs
3 Replies

3. Shell Programming and Scripting

Merge text files while combining the multiple header/trailer records into one each.

Situation: Our system currently executes a job (COBOL Program) that generates an interface file to be sent to one of our vendors. Because this system processes information for over 100,000 employees/retirees (and growing), we'd like to multi-thread the job into processing-groups in order to... (4 Replies)
Discussion started by: oordonez
4 Replies

4. Shell Programming and Scripting

Removing Header & Trailer from a file

Hi All, I am karthik. I am new to this forum. I have one requirement. I have a file with header and footer. Header may be like HDR0001 or FILE20090110 (Assume it is unknown so far, but i am sure there is a header in the file) likewise file has the trailer too. I just... (7 Replies)
Discussion started by: karthi_gana
7 Replies

5. Shell Programming and Scripting

Need to echo a text where a (.) is added to the end of line during on-going copy or ftp

Hello All, I would like to create a script to echo a text where a (.) dot is added every 2 seconds to the end of this text (with a limit of 10 dots) as long as a file copy or ftp is ongoing and once the copy is finished it adds "done" to the end of this text line. please see the below example: ... (6 Replies)
Discussion started by: Dendany83
6 Replies

6. UNIX for Dummies Questions & Answers

Adding header and trailer into a file

Hi, I want to add the below Header to all the files in sequence File1,File2,File3...etc "ABC,<number of chracter in the file>" e,g - If File1 is as below pqrstuvdt abcdefgh then I want to add the above header into it ,So that File1 becomes as below ABC,17 pqrstuvdt abcdefgh ... (9 Replies)
Discussion started by: spari2
9 Replies

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

8. Shell Programming and Scripting

Verify the header and trailer in file

please see my requirement, I hope I am clear. (9 Replies)
Discussion started by: mirwasim
9 Replies

9. Programming

Dynamically added text fields passed to PHP script

If I am posting this to the wrong section please move it somewhere it fits. I apologize if this is not the correct section. I have a site where I want to have form that in a "Visitor name" section to be able to add fieldets as needed. I think I have that worked out. So the below code is the... (4 Replies)
Discussion started by: GroveTuckey
4 Replies

10. UNIX for Dummies Questions & Answers

Sending mail to multiple recipient added in a text file

I am trying to find a code that can help me mail to a list of recipients which are in a text file. Sample code $cat recipient.txt me@test.com me1@test.com me2@test.com I want a mailx step that can read contents of recipient.txt and mail to all the users. I don't want to use mails... (1 Reply)
Discussion started by: Gurkamal83
1 Replies
SLUGIMAGE(1)						      General Commands Manual						      SLUGIMAGE(1)

NAME
slugimage - Manipulate NSLU2 firmware images SYNOPSIS
slugimage [-p|-u] [options] DESCRIPTION
slugimage can be used to create or unpack NSLU2 firmware images. OPTIONS
-d, --debug Turn on debugging output -q, --quiet Turn off status messages -u, --unpack Unpack a firmware image -p, --pack Pack a firmware image -l, --little Convert Kernel and Ramdisk to little-endian -i, --input Input firmware image filename -o, --output Output firmware image filename -b, --redboot Input/Output RedBoot filename -k, --kernel Input/Ouptut Kernel filename -s, --sysconf Input/Output SysConf filename -r, --ramdisk Input/Output Ramdisk filename(s) -f, --fisdir Input/Output FIS directory filename -y, --payload Input/Output Payload filename -t, --trailer Input/Output Trailer filename -e, --ethaddr Set the Ethernet address AUTHOR
This man page was written by Joey Hess, <joey@kitenet.net>. SLUGIMAGE(1)
All times are GMT -4. The time now is 04:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy