06-21-2006
How to add a new line into a file
I want to insert a new line character inside the file between these two record entries "san" and "man". How can this be done
echo " san " >"C:/\Test/\Output/\Neme"
echo " man " >>"C:/\Test/\Output/\Name"
Name file should look like this
san
man
Please help
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I need to add a line to several files. But this line can only be added if it has an 'a' or 'A' in its current first line and only for the first line of each file.
I tried sed, but i cant figure how to make it change just the first line. It just changes me all lines with an a. Can you give... (2 Replies)
Discussion started by: Scarlos
2 Replies
2. Shell Programming and Scripting
Hi
I want to search for a string and add a new line after that line in the file.
Say I have a file
Input file
adfad
aadfsdfsa
adfadsf
<name>TypeOptions</name>
adfdasf
adfad
adfad
outputfile
adfad
aadfsdfsa
adfadsf
<name>TypeOptions</name>
<option xsi:type="metadata:Option"... (3 Replies)
Discussion started by: ammu
3 Replies
3. Shell Programming and Scripting
How can i add new parameters into a line, and redirect the line to other file?
For example:
1.sh
name:owner
google:richard
youtube:student
I want a, for example 2.sh with:
name:owner:description
google:richard:search site
youtube:student:video site
In the 2.sh, I added a new column:... (7 Replies)
Discussion started by: rafazz
7 Replies
4. Shell Programming and Scripting
Hi
Trying to do like this :
echo "$variable1\n $(cat file.txt)"
but it only adds one time. When I run this cmd again with different variable it only replaces line of variable1.
How to add constantly line into first line in file ? (3 Replies)
Discussion started by: presul
3 Replies
5. Linux
How would I do that?
/Rutger (6 Replies)
Discussion started by: rutgerblom
6 Replies
6. Shell Programming and Scripting
Hi All,
I have a file, let's call it "info.tmp" that contains data like this ..
ABC123456
PCX333445
BCD789833
I need to read "info.tmp" and for each line add strings in a way that the final output is
put /logs/ua/dummy.trigger 'AAA00001.FTP.XXX.BLA03A01.xxxxxx(+1)'
where XXX... (5 Replies)
Discussion started by: Andy_ARG
5 Replies
7. Shell Programming and Scripting
I cannot seem to get this to work..
I have a file which has about 100 lines, and there is no end of line (line break \n) at the end of each line, and this is causing problem when i paste them into an application.
the file looks like this
this is a test
that is a test
balblblablblhblbha... (1 Reply)
Discussion started by: fedora
1 Replies
8. Shell Programming and Scripting
hello,
I have problem with writing/adjusting a shell script.
I searched forum and unfortunately couldn't write scipt based on the information I found.
I never wtire such so it's hard for me and I do need to modify one script immediately.
case looks like:
1. 'file' that needs to be modified... (3 Replies)
Discussion started by: bipbip
3 Replies
9. Shell Programming and Scripting
Hi Guys,
I have file A.txt
File A Data
AK1521
AK2536
AK3164
I want create text file of all data above and write some data on each file.
want Output on below folder
/home/kka/out
AK1521.txt
Hi
Welocme (3 Replies)
Discussion started by: asavaliya
3 Replies
10. Shell Programming and Scripting
Hi,
I want to achieve something similar to what described in another post:
The difference is I want to add the line if the pattern is not found.
File 1:
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
... (11 Replies)
Discussion started by: jyu3
11 Replies
LEARN ABOUT CENTOS
strongimcv_pki---req
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)