04-17-2009
Hi User,
Following might be helpfull.
TEST>for file in *
> do
> awk 'BEGIN { print "header" } { print $0 } END { print "footer" }' $file > ${file}"_out"
> done
Last edited by panyam; 04-17-2009 at 06:38 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
Hi Gurus,
My requirement is, I am passing a file1.dat into this(rowcnt.sh) script,but returning a wrong value of -2.(it should be 4).Becoz my file1.dat contains 6records incl: Header & Footer.(6-2=4)
wrong output:
-------
#sh rowcnt.sh file1.dat
-2 actual_cnt except HDR & FTR
should be:... (3 Replies)
Discussion started by: vsubbu1000
3 Replies
3. Shell Programming and Scripting
Hi, Guys,
I want add header and footer in a file. I can add footer using following command:
echo "Footer" >>file.
I don't know how to add header.
Thanks in advance (4 Replies)
Discussion started by: ken002
4 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I need to check whether the incoming file has a header and footer using a UNIX script. The pattern of the header and footer is fixed as follows:
Header: Name,Date
Footer: Count, Total
Name,Date
-------------------------
-------------------------
-------------------------
Count,... (5 Replies)
Discussion started by: Sunny_teotia
5 Replies
5. Shell Programming and Scripting
Hi All,
I need to write a script that In my file I have to check header and footer records are available or not. If it is available I have to run the script, otherwise I should not. But current script it is checking only the data inside the script. It is avoiding to check Header and Footer... (1 Reply)
Discussion started by: suresh_target
1 Replies
6. Shell Programming and Scripting
I have two files which are getting sent to a UNIX server in order to be bcp'd into a database. The bcp is failing because there's a header and footer row on the file which give the date of the file and the number of rows in it. That's because the file is also being used for another process, so we... (1 Reply)
Discussion started by: Tom Sawyer
1 Replies
7. Shell Programming and Scripting
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
Hi Every one,
what is the coomand to remove header or footer from a file.
Please help me by providing command/syntax to remove header/footer from unix.
Thanks in advance for all your support. (5 Replies)
Discussion started by: sridhardwh
5 Replies
9. Programming
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. Shell Programming and Scripting
Hi I have below requirements on the script below :
(1) I receive 2 pipe seperated file called OUT.psv and DIFF.psv with a column header.I concatenate the 2 files and create a final.psv file. I want to add another header as START_FILE to the final.psv file . How to achieve this ?
(2) I have... (5 Replies)
Discussion started by: samrat dutta
5 Replies
PKCS7(1) OpenSSL PKCS7(1)
NAME
pkcs7 - PKCS#7 utility
SYNOPSIS
openssl pkcs7 [-inform PEM|DER] [-outform PEM|DER] [-in filename] [-out filename] [-print_certs] [-text] [-noout] [-engine id]
DESCRIPTION
The pkcs7 command processes PKCS#7 files in DER or PEM format.
COMMAND OPTIONS
-inform DER|PEM
This specifies the input format. DER format is DER encoded PKCS#7 v1.5 structure.PEM (the default) is a base64 encoded version of the
DER form with header and footer lines.
-outform DER|PEM
This specifies the output format, the options have the same meaning as the -inform option.
-in filename
This specifies the input filename to read from or standard input if this option is not specified.
-out filename
specifies the output filename to write to or standard output by default.
-print_certs
prints out any certificates or CRLs contained in the file. They are preceded by their subject and issuer names in one line format.
-text
prints out certificates details in full rather than just subject and issuer names.
-noout
don't output the encoded version of the PKCS#7 structure (or certificates is -print_certs is set).
-engine id
specifying an engine (by its unique id string) will cause pkcs7 to attempt to obtain a functional reference to the specified engine,
thus initialising it if needed. The engine will then be set as the default for all available algorithms.
EXAMPLES
Convert a PKCS#7 file from PEM to DER:
openssl pkcs7 -in file.pem -outform DER -out file.der
Output all certificates in a file:
openssl pkcs7 -in file.pem -print_certs -out certs.pem
NOTES
The PEM PKCS#7 format uses the header and footer lines:
-----BEGIN PKCS7-----
-----END PKCS7-----
For compatibility with some CAs it will also accept:
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
RESTRICTIONS
There is no option to print out all the fields of a PKCS#7 file.
This PKCS#7 routines only understand PKCS#7 v 1.5 as specified in RFC2315 they cannot currently parse, for example, the new CMS as
described in RFC2630.
SEE ALSO
crl2pkcs7(1)
1.0.1e 2013-02-11 PKCS7(1)