Sponsored Content
Full Discussion: Array Retrieval Formatting
Top Forums Shell Programming and Scripting Array Retrieval Formatting Post 75173 by gozer13 on Wednesday 15th of June 2005 04:40:02 PM
Old 06-15-2005
Computer Array Retrieval Formatting

I have a shell script (Solaris v8 ksh) loading an array from a flat file. An exaple of that flat file is below. It contains white-spaces, and carrage returns. When I try to load the first line as a variable, it (the variable) shows up as the first field not the first line. How do you arrange an array by carrage return? I know it can be done, but can't find anywhere that talk about it. Thanks in advance for replies, this forum rocks!

description.lst snippet ->
API Programmers Reference
Backup Procedures for Vista Plus on UNIX
The Vista Backup and Recovery Plan
Vista Plus Check Generations Usage Guide
-------------------------------------------------------------------------
shell scrip snippet->
set -A description $(cat $SHDIR/description.lst $1)
CNT=0
REPDESC=${description[$CNT]}
-------------------------------------------------------------------------
If I echo $REPDESC I get:
API
I would like it to echo:
API Programmers Reference

I have tried putting the contents of description.lst into “ “ to no avail.

Last edited by gozer13; 06-15-2005 at 05:46 PM..
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Retrieval of deleted files

We have a situation in a large dept of programmers where critical accounting data files were deleted. Is there any way in UNIX to trace deletions and or possibly retrieve the deleted file? (14 Replies)
Discussion started by: cgardiner
14 Replies

2. Solaris

Configure Ultra for Web doc retrieval

I have an ultra 10 - running solaris 9 that I installed a few weeks ago... I am not sure how to phrase this but basically I have some html doc's that I store on the ultra but I want people to be able to access from their windows workstation on our lan... How can I do this? If you could help... (4 Replies)
Discussion started by: frustrated1
4 Replies

3. UNIX and Linux Applications

Free-text retrieval utility

Can anyone recommend an free-text retrieval utility? Open source or free preferred. Any views on say IQ-text? (0 Replies)
Discussion started by: MJDRM
0 Replies

4. Shell Programming and Scripting

MySQL bulk retrieval of database through html form

Have to delete this long post. Seems nobody would spent time on it. (0 Replies)
Discussion started by: yifangt
0 Replies

5. UNIX for Dummies Questions & Answers

Formatting Array Output

Hello All, Q1) I have the below code but when the email was sent out all lines are merged and coming out as a single line though my printf statement has newline "\n", How do i avoid that? Q2) In my second IF statement when i introduced the backslash "\" for continuation of a line or command, i... (10 Replies)
Discussion started by: Ariean
10 Replies

6. Shell Programming and Scripting

Perl array formatting

Experts, I'm having problems with a portion of my perl script. I have a perl array that contains the following: Port1,circuit3,2;4 Port2,circuit1,9;6 Port3,circuit2,12;5 Port4,circuit4,11;10;3 Port5,circuit7,8;7;1 I'm trying to produce the following output: (3 Replies)
Discussion started by: timj123
3 Replies
LCP_CRTPOLLIST(8)						   User Manuals 						 LCP_CRTPOLLIST(8)

NAME
lcp_crtpollist - create an Intel(R) TXT policy list SYNOPSIS
lcp_crtpollist COMMAND [OPTION] DESCRIPTION
lcp_crtpollist is used to create an Intel(R) TXT policy list. OPTIONS
--create Create an TXT policy list. The following options are available: --out file policy list file [--ver version] version [file]... policy element files --sigh Sign an TXT policy list. --pub key-file PEM file of public key --out file policy list file [--priv key-file] PEM file of private key [--rev rev-ctr] revocation counter value [--nosig] don't add SigBlock --addsig --sig file file containing signature (big-endian) --out file policy list file --show file policy list file --help Print out the help message. --verbose Enable verbose output; can be specified with any command. EXAMPLES
Create policy list: Assuming there have been two element file mle.elt and pconf.elt generated by lcp_crtpolelt(8) The following example can create an unsigned policy list: lcp_crtpollist --create --out list-unsig.lst mle.elt pconf.elt Sign policy list: Unsigned policy list can be signed by the command lcp_crtpollist(8) or openssl(1). The openssl(1) signing is supported for cases where the signing environment is separate from the policy creation environment and the software allowed to run there is strictly controlled and already supports openssl(1). The following example uses openssl(1) to sign the list: 1 openssl rsa -pubout -in privkey.pem -out pubkey.pem 2 cp list-unsig.lst list-sig.lst 3 lcp_crtpollist --sigh --pub pubkey.pem --nosig --out list-sig.lst 4 openssl genrsa -out privkey.pem 2048 5 openssl dgst -sha1 -sign privkey.pem -out list.sig list-sig.lst 6 lcp_crtpollist --addsig --sig list.sig --out list-sig.lst lcp_crtpollist can also be used to sigh a policy list. The following example are intended to be mutually exclusive with the preceding exam- ple. 1 openssl genrsa -out privkey.pem 2048 2 openssl rsa -pubout -in privkey.pem -out pubkey.pem 3 cp list-unsig.lst list-sig.lst 4 lcp_crtpollist --sign --pub pubkey.pem --priv privkey.pem --out list-sig.lst SEE ALSO
lcp_crtpol2(8), lcp_crtpolelt(8), lcp_crtpollist(8), openssl(1). tboot 2011-12-31 LCP_CRTPOLLIST(8)
All times are GMT -4. The time now is 04:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy