Sponsored Content
Top Forums Shell Programming and Scripting rowwise concatenation of files Post 302136019 by SanjayLinux on Friday 14th of September 2007 06:06:56 AM
Old 09-14-2007
Try This Hope it will work for you Smilie

---------------------------------
cat 1n.txt:

get_next_sp_fixing_mod_ref_no,
get_next_sp_tran_ref_no,

cat 2n.txt -
boxer1.cpp
boxer2.cpp
-----------------------------------------
This Code will work for your:
____________________________________
awk 'BEGIN{FS=","}
{
if (NF==1)
san[NR]=$0
if (NF>1)
jay[NR-3]=$0
}
END{
for (i in san)
printf("%s,%s\n",jay[i],san[i])
}

' 1n.txt 2n.txt
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Concatenation

What is syntax for String concatenation? I have $1 as directory. $var is some variable value '/' String value. How do I have to concatenate if I have to run utility - util $1 followed by '/' followed by $var There is no space between these three. (2 Replies)
Discussion started by: videsh77
2 Replies

2. Shell Programming and Scripting

rearranging the data in file (from columnwise to rowwise)

Hi I have one file which is having data like 10201 10202 10205 10206 10207 10208 10209 10210 10211 10213 10215 10801 10802 11406 11415 11422 11426 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11530 11604 11608 11611 11717 11718 11719 11722 11725... (3 Replies)
Discussion started by: reldb
3 Replies

3. Shell Programming and Scripting

Concatenation

How can I do this: date = 4 -----------> 04 Month= 3-----------> 03 I wish to make a varibale named Var1 which will hold the value of current date and month value as: 2 digits for date. 2 digits for month. So finally var1 should hold value as 0403 --- MMDD (11 Replies)
Discussion started by: Asteroid
11 Replies

4. UNIX for Advanced & Expert Users

Faster Concatenation of files

Dear All I am using cat command for concatenating multiple files. Some time i also use append command when there are few files. Is there faster way of concatenating multiple files(60 to 70 files) each of 156 MB or less/more.:) Thanx (1 Reply)
Discussion started by: tkbharani
1 Replies

5. UNIX for Dummies Questions & Answers

Concatenation of multiple files with wildcard

I have the following snippet to concatenate about a hundred csv-files: for file in *csv; do cat $file >> newfile; done This line works, but before I was experimenting with the following line, which is more intuitive and is a tad more robust: for file in *.csv; do cat $file >> newfile; done Can... (2 Replies)
Discussion started by: figaro
2 Replies

6. Shell Programming and Scripting

Removing Header from files before Concatenation

I need to concatenate the files of same type but with different names that conatin header. Before conactenating its mandatory to remove the header from the files .. and after concatenation the output file should contain header too. how to do it... thanks in advance. (4 Replies)
Discussion started by: amitpta
4 Replies

7. Shell Programming and Scripting

Concatenation of a large number of files

Hellow i have a large number of files that i want to concatenate to one. these files start with the word 'VOICE_' for example VOICE_0000000000 VOICE_1223o23u0 VOICE_934934927349 I use the following code: cat /ODS/prepaid/CDR_FLOW/MEDIATION/VOICE_* >> /ODS/prepaid/CDR_FLOW/WORK/VOICE ... (10 Replies)
Discussion started by: chriss_58
10 Replies

8. Shell Programming and Scripting

Help with String concatenation

I have a script which is migrated from AIX to Linux & now while running it is no able to concatenate string values The string concatenation step under while loop is not displaying desired result Please find below the piece of code: while read EXT_FILE ; do EXT_FILE=$EXT_FILE.ext.sent echo... (7 Replies)
Discussion started by: PreetArul
7 Replies

9. UNIX for Advanced & Expert Users

Concatenation of multiple files based on file pattern

Hi, I have the following reports that get generated every 1 hour and this is my requirement: 1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR" "Report.Dddmmyy.Thhmiss.ACCD" "Report.Dddmmyy.Thhmiss.BCCD" "Report.Dddmmyy.Thhmiss.CCCD"... (1 Reply)
Discussion started by: Jesshelle David
1 Replies

10. Shell Programming and Scripting

Concatenation of files with same naming patterns dynamically

Since my last threads were closed on account of spamming, keeping just this one opened! Hi, I have the following reports that get generated every 1 hour and this is my requirement: 1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR"... (5 Replies)
Discussion started by: Jesshelle David
5 Replies
PKI --REQ(1)							    strongSwan							      PKI --REQ(1)

NAME
pki --req - Create a PKCS#10 certificate request SYNOPSIS
pki --req [--in file] [--type type] --dn distinguished-name [--san subjectAltName] [--password password] [--digest digest] [--outform encoding] [--debug level] pki --req --options file pki --req -h | --help DESCRIPTION
This sub-command of pki(1) is used to create a PKCS#10 certificate request. OPTIONS
-h, --help Print usage information with a summary of the available options. -v, --debug level Set debug level, default: 1. -+, --options file Read command line options from file. -i, --in file Private key input file. If not given the key is read from STDIN. -t, --type type Type of the input key. Either rsa or ecdsa, defaults to rsa. -d, --dn distinguished-name Subject distinguished name (DN). Required. -a, --san subjectAltName subjectAltName extension to include in request. Can be used multiple times. -p, --password password The challengePassword to include in the certificate request. -g, --digest digest Digest to use for signature creation. One of md5, sha1, sha224, sha256, sha384, or sha512. Defaults to sha1. -f, --outform encoding Encoding of the created certificate file. Either der (ASN.1 DER) or pem (Base64 PEM), defaults to der. EXAMPLES
Generate a certificate request for an RSA key, with a subjectAltName extension: pki --req --in key.der --dn "C=CH, O=strongSwan, CN=moon" --san moon@strongswan.org > req.der Generate a certificate request for an ECDSA key and a different digest: pki --req --in key.der --type ecdsa --digest sha256 --dn "C=CH, O=strongSwan, CN=carol" > req.der SEE ALSO
pki(1) 5.1.1 2013-07-31 PKI --REQ(1)
All times are GMT -4. The time now is 02:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy