10-29-2009
Removing ^M characters
hi
I have a perl script conv.pl. when i execute this file and direct i to log file I see lots of ^M characters in the log file. There is no ^M in conv.pl file. Log file is generated only after conv.pl is executed.
Please help as how to get rid of these.
This conv.pl is going to get schduled in crontab so I will have to get it fix before hand only and not after log file is created.
$> conv.pl > a.log
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have few files in unix which are in dos format. While I am copying these files, ^M, ^@, etc characters are being generated.
I tried dos2unix command in Linux and it doesn't work.
I tried sed to remove these characters but they won't go.
I came to about this 'tr' command and tried to use it... (16 Replies)
Discussion started by: chiru_h
16 Replies
2. Shell Programming and Scripting
Hi
I have a file that has semicolons in it (;) is there a way to just remove these in the file. Example
name: Joe Smith; group: Group1;
name: Mary White; group: Group2; (2 Replies)
Discussion started by: bombcan
2 Replies
3. HP-UX
Hi,
I have a very huge file and it contains some unprintable characters like ^H and ^D.
If I try to remove using cat test1.ser| tr -d '\136 110'>newfile1 it is only removing ^and all spaces in the file.
How can I remove these characters (^D ^H) and keep my spaces as it is?
Thanks &... (1 Reply)
Discussion started by: arsheshadri
1 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
Any help on how to do the following? :eek:
I have an infile as follows:
_thisishowyouwritehelloworld
_thisisalsohowyouwritehelloworld2
I want to delete the characters from "_" to "how" and be left with:
youwritehelloworld
youwritehelloworld2
I am able to do delete from a... (2 Replies)
Discussion started by: dr_sabz
2 Replies
5. UNIX for Advanced & Expert Users
hi
I have a perl script conv.pl. when i execute this file and direct i to log file I see lots of ^M characters in the log file. There is no ^M in conv.pl file. Log file is generated only after conv.pl is executed.
Please help as how to get rid of these.
This conv.pl is going to get schduled... (0 Replies)
Discussion started by: infyanurag
0 Replies
6. Shell Programming and Scripting
Dear Friends,
I want to remove text between two patters.
Problem is, it has random special characters like \ / | * ` ~ ! $ etc.
These random special characters has no fixed length. But these special characters are appearing between a fixed pattern
e.g.
DM&^%#|#!\/?CT
Expected output... (14 Replies)
Discussion started by: anushree.a
14 Replies
7. UNIX for Dummies Questions & Answers
Hi,
in a file, i have records as below:
123|62|absnb|267629
123|267|28728|uiuip
123|567|26761|2676
i want to remove the non printable characters after the end of each record.
I guess there are certain charcters but not visible.
i don't know what character that is exactly.
I used... (2 Replies)
Discussion started by: pandeesh
2 Replies
8. UNIX for Dummies Questions & Answers
I have been given a shell script that I need to amend. To do the following
extract the filename from the flag file by removing the .flag extension.
# Local variables
# Find if the flag files exists
MASK=coda_mil2*.flag
# Are there any files?
bookmark="40"
fileFound=0
ls -1... (3 Replies)
Discussion started by: andymay
3 Replies
9. Shell Programming and Scripting
bash-3.00$ cat temp.txt
./a/REA01/ces1/apps/ces_ces1_init3_aa.ear/ces.war/WEB-INF/classes/reds/common/environment.properties
./a/REA01/ces1/apps/ces_ces1_init3_aa.ear/commonproperties/hi/HostIntegration.properties... (9 Replies)
Discussion started by: bhas85
9 Replies
10. Shell Programming and Scripting
Hi there,
Im having a bit of difficulty with this one and I suspect its because of the character I want to match against maybe causing me a problem, but i wanted to remove everything up to (but not including) the first instance of '{' in a string
so for example the string that I want to... (2 Replies)
Discussion started by: hcclnoodles
2 Replies
LEARN ABOUT DEBIAN
pkcs1-conv
PKCS1-CONV(1) Nettle tools PKCS1-CONV(1)
NAME
pkcs1-conv - convert keys from PKCS#1 format to s-expression format
SYNOPSIS
pkcs1-conv [{--private-rsa-key|--public-rsa-key|--public-key-info} [--base-64]] < FILE
DESCRIPTION
This manual page documents briefly the pkcs1-conv command. This manual page was written for the Debian GNU/Linux distribution because the
original program does not have a manual page.
pkcs1-conv converts private and public RSA keys from PKCS #1 format to sexp format.
OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-').
By default pkcs1-conv expects a PEM-encapsulated RSA key on standard input, and will determine its type from the Pre-Encapsulation Bound-
ary. To convert a DER-encoded (non PEM-encoded) key, one of the first three options below must be used:
--private-rsa-key
Specify that a DER-encoded RSAPrivateKey, as defined by PKCS #1 (RFC 3447), and described in section A.1.2 of its appendix A, is to
be expected as input.
--public-rsa-key
Specify that a DER-encoded RSAPublicKey, as defined by PKCS #1 (RFC 3447), and described in section A.1.1 of its appendix A, is to
be expected as input.
--public-key-info
Specify that a DER-encoded SubjectPublicKeyInfo, as defined by PKCS #6, and described in section A.1 of its appendix A, encapsulat-
ing an RSAPublicKey, is to be expected as input.
--base-64
Together with --private-rsa-key, --public-rsa-key, or --public-key-info, specify that base64 encoding is applied on top of the DER
encoding.
-?, --help
Show summary of options (not implemented).
-V, --version
Show version of program.
DIAGNOSTICS
pkcs1-conv will complain and exit with a status of 1 if the input doesn't match expectations. In PEM mode (when no option is used), if no
PEM block is found, pkcs1-conv will output nothing but exit with a zero status.
EXAMPLES
$ openssl genrsa -out privkey.pem
$ pkcs1-conv < privkey.pem > privkey.sexp
$ openssl rsa -in privkey.pem -outform DER -out privkey.der
$ openssl rsa -in privkey.pem -outform DER -pubout -out pubkey.der
$ pkcs1-conv --rsa-private-key < privkey.der > privkey.sexp
$ pkcs1-conv --public-key-info < pubkey.der > pubkey.sexp
SEE ALSO
ssh-conv(1), sexp-conv(1), rsa(1SSL), genrsa(1SSL), RFC 3447.
AUTHOR
This manual page was written by Magnus Holmgren <holmgren@debian.org> for the Debian GNU/Linux system (but may be used by others).
COPYRIGHT
Copyright (C) 2007 Magnus Holmgren.
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
nettle 1.15 June 2007 PKCS1-CONV(1)