Sponsored Content
Full Discussion: Korn shell "select" command
Top Forums Shell Programming and Scripting Korn shell "select" command Post 23425 by mpegler on Sunday 23rd of June 2002 08:47:51 PM
Old 06-23-2002
Korn shell "select" command

I wish to display a full "ls -l" line per selection using the korn shell "select" command.

ie :
1) -rw-rw---- 1 u22adm tbs 6144 Mar 15 10:29 y.dat
2) -rw-rw---- 1 u22adm tbs 4096 Mar 15 10:29 y.idx
etc
etc

I can get spaces in :

select f in "a a" "b b" "c c"; do
> echo $f
> done
1) a a
2) b b
3) c c
#?
I can't do the same with inline execution :

select f in $( /bin/ls -l y* | sed 's/\(.*\)/"\1"/' ); do
echo $f
done
1) "-rw-rw---- 10) "-rw-rw----
2) 1 11) 1
3) u22adm 12) u22adm
4) tbs 13) tbs
5) 6144 14) 4096
6) Mar 15) Mar
7) 15 16) 15
8) 10:29 17) 10:29
9) y.dat" 18) y.idx"

How could I achieve this ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find -name "*.txt" in Korn Shell Script

The following find command works on the Korn Shell command line: find . \( ! -name . -prune \) -type f -name "*.txt" -mtime +100 In the particular directory I'm in, the above find will list correctly the three text files that exist that haven't been modified in over 100 days: ... (3 Replies)
Discussion started by: jwperry
3 Replies

2. Shell Programming and Scripting

korn shell "loops & arrays"

Hi, I am trying to write a script which will loop until a certain action has been performed. I have two files i would like to compares. For example: file1 has a list of user ids (about 900) from the company's e-mail server. file2 has a list of user ids (about 50 or so) from... (7 Replies)
Discussion started by: muzica
7 Replies

3. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies

4. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

5. UNIX for Advanced & Expert Users

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

6. Shell Programming and Scripting

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

9. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
hx509 CA functions(3)						Heimdalx509library					     hx509 CA functions(3)

NAME
hx509 CA functions - Functions int hx509_ca_tbs_init (hx509_context context, hx509_ca_tbs *tbs) void hx509_ca_tbs_free (hx509_ca_tbs *tbs) int hx509_ca_tbs_set_notBefore (hx509_context context, hx509_ca_tbs tbs, time_t t) int hx509_ca_tbs_set_notAfter (hx509_context context, hx509_ca_tbs tbs, time_t t) int hx509_ca_tbs_set_notAfter_lifetime (hx509_context context, hx509_ca_tbs tbs, time_t delta) struct units * hx509_ca_tbs_template_units (void) int hx509_ca_tbs_set_template (hx509_context context, hx509_ca_tbs tbs, int flags, hx509_cert cert) int hx509_ca_tbs_set_ca (hx509_context context, hx509_ca_tbs tbs, int pathLenConstraint) int hx509_ca_tbs_set_proxy (hx509_context context, hx509_ca_tbs tbs, int pathLenConstraint) int hx509_ca_tbs_set_domaincontroller (hx509_context context, hx509_ca_tbs tbs) int hx509_ca_tbs_set_spki (hx509_context context, hx509_ca_tbs tbs, const SubjectPublicKeyInfo *spki) int hx509_ca_tbs_set_serialnumber (hx509_context context, hx509_ca_tbs tbs, const heim_integer *serialNumber) int hx509_ca_tbs_add_eku (hx509_context context, hx509_ca_tbs tbs, const heim_oid *oid) int hx509_ca_tbs_add_crl_dp_uri (hx509_context context, hx509_ca_tbs tbs, const char *uri, hx509_name issuername) int hx509_ca_tbs_add_san_otherName (hx509_context context, hx509_ca_tbs tbs, const heim_oid *oid, const heim_octet_string *os) int hx509_ca_tbs_add_san_pkinit (hx509_context context, hx509_ca_tbs tbs, const char *principal) int hx509_ca_tbs_add_san_ms_upn (hx509_context context, hx509_ca_tbs tbs, const char *principal) int hx509_ca_tbs_add_san_jid (hx509_context context, hx509_ca_tbs tbs, const char *jid) int hx509_ca_tbs_add_san_hostname (hx509_context context, hx509_ca_tbs tbs, const char *dnsname) int hx509_ca_tbs_add_san_rfc822name (hx509_context context, hx509_ca_tbs tbs, const char *rfc822Name) int hx509_ca_tbs_set_subject (hx509_context context, hx509_ca_tbs tbs, hx509_name subject) int hx509_ca_tbs_set_unique (hx509_context context, hx509_ca_tbs tbs, const heim_bit_string *subjectUniqueID, const heim_bit_string *issuerUniqueID) int hx509_ca_tbs_subject_expand (hx509_context context, hx509_ca_tbs tbs, hx509_env env) int hx509_ca_sign (hx509_context context, hx509_ca_tbs tbs, hx509_cert signer, hx509_cert *certificate) int hx509_ca_sign_self (hx509_context context, hx509_ca_tbs tbs, hx509_private_key signer, hx509_cert *certificate) Detailed Description See the Hx509 CA functions for description and examples. Function Documentation int hx509_ca_sign (hx509_context context, hx509_ca_tbs tbs, hx509_cert signer, hx509_cert * certificate) Sign a to-be-signed certificate object with a issuer certificate. The caller needs to at least have called the following functions on the to-be-signed certificate object: o hx509_ca_tbs_init() o hx509_ca_tbs_set_subject() o hx509_ca_tbs_set_spki() When done the to-be-signed certificate object should be freed with hx509_ca_tbs_free(). When creating self-signed certificate use hx509_ca_sign_self() instead. Parameters: context A hx509 context. tbs object to be signed. signer the CA certificate object to sign with (need private key). certificate return cerificate, free with hx509_cert_free(). Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_sign_self (hx509_context context, hx509_ca_tbs tbs, hx509_private_key signer, hx509_cert * certificate) Work just like hx509_ca_sign() but signs it-self. Parameters: context A hx509 context. tbs object to be signed. signer private key to sign with. certificate return cerificate, free with hx509_cert_free(). Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_add_crl_dp_uri (hx509_context context, hx509_ca_tbs tbs, const char * uri, hx509_name issuername) Add CRL distribution point URI to the to-be-signed certificate object. Parameters: context A hx509 context. tbs object to be signed. uri uri to the CRL. issuername name of the issuer. Returns: An hx509 error code, see hx509_get_error_string(). issuername not supported int hx509_ca_tbs_add_eku (hx509_context context, hx509_ca_tbs tbs, const heim_oid * oid) An an extended key usage to the to-be-signed certificate object. Duplicates will detected and not added. Parameters: context A hx509 context. tbs object to be signed. oid extended key usage to add. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_add_san_hostname (hx509_context context, hx509_ca_tbs tbs, const char * dnsname) Add a Subject Alternative Name hostname to to-be-signed certificate object. A domain match starts with ., an exact match does not. Example of a an domain match: .domain.se matches the hostname host.domain.se. Parameters: context A hx509 context. tbs object to be signed. dnsname a hostame. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_add_san_jid (hx509_context context, hx509_ca_tbs tbs, const char * jid) Add a Jabber/XMPP jid Subject Alternative Name to the to-be-signed certificate object. The jid is an UTF8 string. Parameters: context A hx509 context. tbs object to be signed. jid string of an a jabber id in UTF8. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_add_san_ms_upn (hx509_context context, hx509_ca_tbs tbs, const char * principal) Add Microsoft UPN Subject Alternative Name to the to-be-signed certificate object. The principal string is a UTF8 string. Parameters: context A hx509 context. tbs object to be signed. principal Microsoft UPN string. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_add_san_otherName (hx509_context context, hx509_ca_tbs tbs, const heim_oid * oid, const heim_octet_string * os) Add Subject Alternative Name otherName to the to-be-signed certificate object. Parameters: context A hx509 context. tbs object to be signed. oid the oid of the OtherName. os data in the other name. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_add_san_pkinit (hx509_context context, hx509_ca_tbs tbs, const char * principal) Add Kerberos Subject Alternative Name to the to-be-signed certificate object. The principal string is a UTF8 string. Parameters: context A hx509 context. tbs object to be signed. principal Kerberos principal to add to the certificate. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_add_san_rfc822name (hx509_context context, hx509_ca_tbs tbs, const char * rfc822Name) Add a Subject Alternative Name rfc822 (email address) to to-be-signed certificate object. Parameters: context A hx509 context. tbs object to be signed. rfc822Name a string to a email address. Returns: An hx509 error code, see hx509_get_error_string(). void hx509_ca_tbs_free (hx509_ca_tbs * tbs) Free an To Be Signed object. Parameters: tbs object to free. int hx509_ca_tbs_init (hx509_context context, hx509_ca_tbs * tbs) Allocate an to-be-signed certificate object that will be converted into an certificate. Parameters: context A hx509 context. tbs returned to-be-signed certicate object, free with hx509_ca_tbs_free(). Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_set_ca (hx509_context context, hx509_ca_tbs tbs, int pathLenConstraint) Make the to-be-signed certificate object a CA certificate. If the pathLenConstraint is negative path length constraint is used. Parameters: context A hx509 context. tbs object to be signed. pathLenConstraint path length constraint, negative, no constraint. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_set_domaincontroller (hx509_context context, hx509_ca_tbs tbs) Make the to-be-signed certificate object a windows domain controller certificate. Parameters: context A hx509 context. tbs object to be signed. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_set_notAfter (hx509_context context, hx509_ca_tbs tbs, time_t t) Set the absolute time when the certificate is valid to. Parameters: context A hx509 context. tbs object to be signed. t time when the certificate will expire Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_set_notAfter_lifetime (hx509_context context, hx509_ca_tbs tbs, time_t delta) Set the relative time when the certificiate is going to expire. Parameters: context A hx509 context. tbs object to be signed. delta seconds to the certificate is going to expire. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_set_notBefore (hx509_context context, hx509_ca_tbs tbs, time_t t) Set the absolute time when the certificate is valid from. If not set the current time will be used. Parameters: context A hx509 context. tbs object to be signed. t time the certificated will start to be valid Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_set_proxy (hx509_context context, hx509_ca_tbs tbs, int pathLenConstraint) Make the to-be-signed certificate object a proxy certificate. If the pathLenConstraint is negative path length constraint is used. Parameters: context A hx509 context. tbs object to be signed. pathLenConstraint path length constraint, negative, no constraint. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_set_serialnumber (hx509_context context, hx509_ca_tbs tbs, const heim_integer * serialNumber) Set the serial number to use for to-be-signed certificate object. Parameters: context A hx509 context. tbs object to be signed. serialNumber serial number to use for the to-be-signed certificate object. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_set_spki (hx509_context context, hx509_ca_tbs tbs, const SubjectPublicKeyInfo * spki) Set the subject public key info (SPKI) in the to-be-signed certificate object. SPKI is the public key and key related parameters in the certificate. Parameters: context A hx509 context. tbs object to be signed. spki subject public key info to use for the to-be-signed certificate object. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_set_subject (hx509_context context, hx509_ca_tbs tbs, hx509_name subject) Set the subject name of a to-be-signed certificate object. Parameters: context A hx509 context. tbs object to be signed. subject the name to set a subject. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_set_template (hx509_context context, hx509_ca_tbs tbs, int flags, hx509_cert cert) Initialize the to-be-signed certificate object from a template certifiate. Parameters: context A hx509 context. tbs object to be signed. flags bit field selecting what to copy from the template certifiate. cert template certificate. Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_set_unique (hx509_context context, hx509_ca_tbs tbs, const heim_bit_string * subjectUniqueID, const heim_bit_string * issuerUniqueID) Set the issuerUniqueID and subjectUniqueID These are only supposed to be used considered with version 2 certificates, replaced by the two extensions SubjectKeyIdentifier and IssuerKeyIdentifier. This function is to allow application using legacy protocol to issue them. Parameters: context A hx509 context. tbs object to be signed. issuerUniqueID to be set subjectUniqueID to be set Returns: An hx509 error code, see hx509_get_error_string(). int hx509_ca_tbs_subject_expand (hx509_context context, hx509_ca_tbs tbs, hx509_env env) Expand the the subject name in the to-be-signed certificate object using hx509_name_expand(). Parameters: context A hx509 context. tbs object to be signed. env enviroment variable to expand variables in the subject name, see hx509_env_init(). Returns: An hx509 error code, see hx509_get_error_string(). struct units* hx509_ca_tbs_template_units (void) [read] Make of template units, use to build flags argument to hx509_ca_tbs_set_template() with parse_units(). Returns: an units structure. Version 1.5.2 11 Jan 2012 hx509 CA functions(3)
All times are GMT -4. The time now is 04:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy