Sponsored Content
Full Discussion: Assigning values to an array
Top Forums UNIX for Dummies Questions & Answers Assigning values to an array Post 77767 by vgersh99 on Tuesday 12th of July 2005 05:12:53 PM
Old 07-12-2005
Code:
set -A myArray value1 value2 value3 value4

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl: Assigning array values..

I have to add a variable value to an array, something like this: ...... @my_array_name = $value_of_this_variable; This doesnt seem to work, any ideas why? Thanks! (4 Replies)
Discussion started by: looza
4 Replies

2. Shell Programming and Scripting

Assigning the values to an Array

hi every body, i donot know how to assign a array varible with a file see i having file more file property1 Name property2 Address the above two line are tab Space seperated between the property and its value i want to seperate it and assign to... (1 Reply)
Discussion started by: kkraja
1 Replies

3. Shell Programming and Scripting

Assigning values to an array via for/while loop

I need to do something like this: for i in 1 2 3 4 5; do arr=$(awk 'NR="$i" { print $2 }' file_with_5_records) done That is, parse a file and assign values to an array in an ascending order relative to the number of record in the file that is being processed on each loop. Is my... (2 Replies)
Discussion started by: fiori_musicali
2 Replies

4. Shell Programming and Scripting

Assigning values for a dynamic array for an input

Hello, Can somebody please give me a snippet for the below requirement. I want to assign the values separeted by a comma to be assigned to a dynamic array. If I give an input (read statement) like abc1,abc2,abc3,abc4,abc5, all these strings abc* should be assigned to an array like below... (2 Replies)
Discussion started by: suneelj
2 Replies

5. Emergency UNIX and Linux Support

Assigning zero to element of ksh array.

set -A matched #find referenced files. for i in ${file_names_html} do counter_j=0 for j in ${file_names_minus_index} do match=`cat $i | grep... (1 Reply)
Discussion started by: robin_simple
1 Replies

6. Shell Programming and Scripting

Assigning array values using awk in shell scripting

hi My script as below #!/bin/ksh for i in `seq 1 7` do a=$(awk '{print $i}' /home/rama/expenese.txt) done for i in `seq 1 7` do echo "${a}" done content of expense.txt is as below 5032 210179 3110 132813874 53488966 11459221 5300794 I want output as... (6 Replies)
Discussion started by: Ramakrishna V
6 Replies

7. Shell Programming and Scripting

Assigning Column Values to ARRAY in ksh

Hi , i have file which is having two fields in it (#delimited) ABC#FILE_01.DAT DEF#FILE_02.DAT i want to write first field values to one array example A_01 and second field values to B_02 array please let me know how to do this ,my final requirement i have send out a mail for each record... (2 Replies)
Discussion started by: kkabc789
2 Replies

8. Shell Programming and Scripting

Perl : Assigning multile hash values to a single array

I know that @food = %fruit; Works. But how do I assign %fruit and %veggies to @food ? (2 Replies)
Discussion started by: popeye
2 Replies

9. Shell Programming and Scripting

Assigning * as value in a ksh array

I want to extract each and single character from a password string and put it in an array. I tried this : set -A password "echo $passwd | awk '{for (i=1; i<=length($1); i++) printf "%s ",substr($1,i,1)}'` It's working as long that the password string doesn't contains any * I tried a few... (5 Replies)
Discussion started by: ce9888
5 Replies

10. Shell Programming and Scripting

Assigning DOM Object value to an array

Hi, I have the following code that makes use of a URL that I store in a variable then create a document object below to work on it. $dom = new DOMDocument; @$dom->loadHTML($html); $links = $dom->getElementsByTagName('a'); $links = $dom->getElementsByTagName('a'); ... (0 Replies)
Discussion started by: mojoman
0 Replies
SECRET-TOOL(1)							   User Commands						    SECRET-TOOL(1)

NAME
secret-tool - Store and retrieve passwords SYNOPSIS
secret-tool store --label='Label' {attribute} {value} ... secret-tool lookup {attribute} {value} ... secret-tool clear {attribute} {value} ... secret-tool search [--all]{attribute} {value} ... DESCRIPTION
secret-tool is a command line tool that can be used to store and retrieve passwords. Each password is stored in an item. Items are uniquely identified by a set of attribute keys and values. When storing a password you must specify unique pairs of attributes names and values, and when looking up a password you provide the same attribute name and value pairs. STORE
To store a password run secret-tool with the store argument. You must also specify a label for the passward with the --label argument. This label will be displayed in the password manager. Make sure to pass a unique set of attributes names and values when storing a password. If the attributes match an already existing item, it will be updated instead of creating a new item. If invoked from a terminal or tty, then the password to store will be prompted for and only one line will be accepted. A password to store can also be piped in via stdin. The password will be the contents of stdin until EOF. If you provide a newline via stdin it will be stored as part of the password. LOOKUP
To lookup a password run secret-tool with the lookup argument. Specify the same same attribute names and value pairs that you passed when storing the password. If multiple items match the attribute provided, then the first password that is already unlocked will be returned. If necessary an item will be unlocked. When printing the password to a terminal or tty, an extra newline will be added after the password. CLEAR
To remove a password run secret-tool with the clear argument. Specify the same attirbute name and value pairs that you passed when storing the password. All unlocked items that match the attributes will be removed. SEARCH
This command searches for and prints details on matching items in secret service. Specify the same attribute and value pairs that you passed in when storing the password. You can use the following options: --all Return all matching results, rather than just the one of the matches. Without this option, the first unlocked match returned from the service will be printed. --unlock Unlock items that are locked and then print out their details. Without this option, locked items are skipped. EXIT STATUS
On success 0 is returned, a non-zero failure code otherwise. EXAMPLES
Example 1. Storing, retrieving, and clearing a password $ secret-tool store --label='My password' key1 value1 key2 value2 Password: My password $ secret-tool lookup key1 value1 key2 value2 My password $ secret-tool clear key1 value1 key2 value2 XDG
SECRET-TOOL(1)
All times are GMT -4. The time now is 06:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy