10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I just want to make sure I am understanding how to pass a config file to a bash script . In the below I pass to arguments to a script, then define them in the script as id and config. I then source config using ., if I understand correctly the variables in the config file can now be used by the... (11 Replies)
Discussion started by: cmccabe
11 Replies
2. Shell Programming and Scripting
Hello.
A find command return a list of file.
For each fileReplace the content starting with the first "§" (of two) ending with last "ɸ" (of two), regardless of the content ( five lines )
by the following content (exactly) :
§2019_08_23§ #
# ... (8 Replies)
Discussion started by: jcdole
8 Replies
3. UNIX for Beginners Questions & Answers
I can't seem to get this right. I've tried it every way imaginable using every trick I see on stackexchange and such. No luck. So nothing major here, something like:
#!/bin/bash
SEARCH="ARG1 ARG2 '((^EXACT$)|(.*InTheMiddle*)|(^AtBeginning*))'"
java -cp /my/class/path MyClassName $SEARCH... (3 Replies)
Discussion started by: stonkers
3 Replies
4. Shell Programming and Scripting
Hello,
My question is about curl command. (ubuntu14.04)
In terminal, I am able to download my mainfile with:
curl -u user1:pass1 http://11.22.33.44/*******
When I convert it into bash script like this:
#!/bin/bash
cd /root/scripts
computer_ip=11.22.33.44
curl -u $1:$2... (8 Replies)
Discussion started by: baris35
8 Replies
5. Shell Programming and Scripting
hi,
i've bash script thats working...
but now i need to add a line....that prompts for user input....like yes and 1 as complete install....
so here's how it looks...
$ cd 9200 (cd into directory)
$./install (hv to type ./install to run install then ask for)
----do you want to... (4 Replies)
Discussion started by: kernel11
4 Replies
6. Shell Programming and Scripting
myscript.sh
#!/bin/bash
ARGA=$1
if ; then
echo "${ARGA}:Confirmed"
else
echo "${ARGA}:Unconfirmed"
fi
when I run the above script from the command line, i run it as:
./myscript.sh jsmith
now some times, i need to runn it this way: (8 Replies)
Discussion started by: SkySmart
8 Replies
7. Shell Programming and Scripting
I have written a script which works fine, to remove patterns contained in EXCLUDE.DAT from input.txt
awk 'BEGIN {n=0;while (getline < "EXCLUDE.DAT" > 0){ex=$0;n++}} {for(var in ex){print var "-" ex $0 ;i++}}' input.txt
The last problem I need to solve is how to pass the file... (3 Replies)
Discussion started by: nixie
3 Replies
8. Shell Programming and Scripting
Hi
This is my bash script.i am calling validation.sql and passing a value to it using ${flds}.
i want the cnt variable in plsql script to be passed to unix.
LOADREC=`sqlplus -s $ORACLE_USR <<-EOF
spool $ORACLE_LOG_FILE;
echo "barani"
@validation.sql #calling the plsql script
${flds}... (6 Replies)
Discussion started by: barani75
6 Replies
9. Shell Programming and Scripting
Hello,
I want to know is it possible to pass a block of sentence using bash.
For example,
I have a script called Test.sh that takes in $1 and $2.
and I'm calling Test.sh in a.sh
so
in a.sh
Test.sh '' 'This is a sentence'
Because block are separated by space so when I do that, I get... (6 Replies)
Discussion started by: katrvu
6 Replies
10. UNIX for Dummies Questions & Answers
By using dd command in Unix one can convert EBCDIC file into ASCII. It fails when it comes to having packed decimals within the EBCDIC file. The resultant of it has garbage chars.
How can we have EBCDIC file convertedinto ASCII, which has packed decimal data in it?
Thanks in advance. (3 Replies)
Discussion started by: videsh77
3 Replies
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)