Hi,
I have a file with about 60 lines of path:
app-defaults/boxXYZ.......
I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command.
Is there any other quick way to do this?
Thanks ;) (2 Replies)
Hi:
I have a requirement as below:
I have some standard Unix commands modified and kept them in a directory say /usr/clsh/bin. For example I have a script named "ls" kept here which is modified version of "ls" (say it always gives long listing i.e. ls -l).
When any user logs on and types... (2 Replies)
I have a script in which i want to print absolute path of the same script irrespective of path from where i run script.
I am using
test.sh:
echo "pwd : `pwd`"
echo "script name: $0"
echo "dirname: `dirname $0`"
when i run script from /my/test/dir/struct as ../test.sh the output i... (10 Replies)
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
Hi All,
Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created.
/Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt
/Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
I want to pattern match only path part from below and replace them with new path string.
LoadModule jk_module /fldrA/fldrBaf/fldrCaa/modules/mod_jk.so
JkWorkersFile /fldrA/fldrBaf/fldrCaa/config/OHS/ohs1/workers.properties
JkLogFile... (4 Replies)
Hi experts,
I have multiple file names ending with .jsp located in $SOME_DIR, $SOME_DIR/f1/,$SOME_DIR/f2/test,$SOME_DIR/f3/fa
and there are equivalent class files in $SOME_DIR/WEB-INF/classes/_pages,$SOME_DIR/WEB-INF/classes/_pages/_f1,... (0 Replies)
Currently I am using this laborious command
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'
Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
i have make file which i try to make them generic
but it keeps to compline it missing include directory
this is the makefile :
CXX=g++
CPPFAGS= -Wall -O0 -g -std=c++14
INCLUDES = -I/home/vagrant/libuv/include -Isrc
LIBS_DIRS = -L/home/vagrant/libuv/build
LDFLAGS=... (7 Replies)
Discussion started by: umen
7 Replies
LEARN ABOUT OPENSOLARIS
dsa
dsa(1openssl) OpenSSL dsa(1openssl)NAME
dsa - DSA key processing
SYNOPSIS
openssl dsa [-inform PEM|DER] [-outform PEM|DER] [-in filename] [-passin arg] [-out filename] [-passout arg] [-des] [-des3] [-idea] [-text]
[-noout] [-modulus] [-pubin] [-pubout] [-engine id]
DESCRIPTION
The dsa command processes DSA keys. They can be converted between various forms and their components printed out. Note This command uses
the traditional SSLeay compatible format for private key encryption: newer applications should use the more secure PKCS#8 format using the
pkcs8
COMMAND OPTIONS -inform DER|PEM
This specifies the input format. The DER option with a private key uses an ASN1 DER encoded form of an ASN.1 SEQUENCE consisting of the
values of version (currently zero), p, q, g, the public and private key components respectively as ASN.1 INTEGERs. When used with a
public key it uses a SubjectPublicKeyInfo structure: it is an error if the key is not DSA.
The PEM form is the default format: it consists of the DER format base64 encoded with additional header and footer lines. In the case
of a private key PKCS#8 format is also accepted.
-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 a key from or standard input if this option is not specified. If the key is encrypted a pass
phrase will be prompted for.
-passin arg
the input file password source. For more information about the format of arg see the PASS PHRASE ARGUMENTS section in openssl(1).
-out filename
This specifies the output filename to write a key to or standard output by is not specified. If any encryption options are set then a
pass phrase will be prompted for. The output filename should not be the same as the input filename.
-passout arg
the output file password source. For more information about the format of arg see the PASS PHRASE ARGUMENTS section in openssl(1).
-des|-des3|-idea
These options encrypt the private key with the DES, triple DES, or the IDEA ciphers respectively before outputting it. A pass phrase is
prompted for. If none of these options is specified the key is written in plain text. This means that using the dsa utility to read in
an encrypted key with no encryption option can be used to remove the pass phrase from a key, or by setting the encryption options it
can be use to add or change the pass phrase. These options can only be used with PEM format output files.
-text
prints out the public, private key components and parameters.
-noout
this option prevents output of the encoded version of the key.
-modulus
this option prints out the value of the public key component of the key.
-pubin
by default a private key is read from the input file: with this option a public key is read instead.
-pubout
by default a private key is output. With this option a public key will be output instead. This option is automatically set if the input
is a public key.
-engine id
specifying an engine (by it's unique id string) will cause req 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.
NOTES
The PEM private key format uses the header and footer lines:
-----BEGIN DSA PRIVATE KEY-----
-----END DSA PRIVATE KEY-----
The PEM public key format uses the header and footer lines:
-----BEGIN PUBLIC KEY-----
-----END PUBLIC KEY-----
EXAMPLES
To remove the pass phrase on a DSA private key:
openssl dsa -in key.pem -out keyout.pem
To encrypt a private key using triple DES:
openssl dsa -in key.pem -des3 -out keyout.pem
To convert a private key from PEM to DER format:
openssl dsa -in key.pem -outform DER -out keyout.der
To print out the components of a private key to standard output:
openssl dsa -in key.pem -text -noout
To just output the public part of a private key:
openssl dsa -in key.pem -pubout -out pubkey.pem
SEE ALSO dsaparam(1), gendsa(1), rsa(1), genrsa(1)OpenSSL-0.9.8 Oct 11 2005 dsa(1openssl)