Sponsored Content
Top Forums Shell Programming and Scripting create an array which can store the strings from the user input in shell script Post 302711893 by Pkast on Monday 8th of October 2012 07:24:23 AM
Old 10-08-2012
create an array which can store the strings from the user input in shell script

I want to create an array which can store the strings from the user input in shell script .

example :-

I want to store the 5 fruits name in a single array which the user provides .
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to store query multiple result in shell script variable(Array)

:) Suppose,I have one table A. Table A have one column. Table A have 10 rows. I want this 10 rows store into shell script variable. like #!/bin/ksh v_shell_var=Hi here in call oracle , through loop How can I store table A's 10 rows into v_shell_var (Shell Script Array). Regards, Div (4 Replies)
Discussion started by: div_Neev
4 Replies

2. Shell Programming and Scripting

sh shell user input and stote it to a array

Dear Friends, I am doing a sh shell script , But I dont have any idea how to read value from user Keyboard and store them to an array .. Is it possible or not I am not also sure in sh shell script ? EX:- #! /bin/sh read DATA echo "DATA -" $DATA echo "DATA -" $DATA echo "DATA... (7 Replies)
Discussion started by: user_prady
7 Replies

3. Shell Programming and Scripting

How to store contents of a command in array of variables in shell script?

I want to store contents of command dir in array of variables For eg: dir contents are command d2 demovi~ file inven java new untitled folder d1 demovi er1 filename inven~ myfiles ubuntu desktop xmms ----------------------------------- I... (3 Replies)
Discussion started by: netresearch
3 Replies

4. Programming

How to pass C array as input to Shell script

Hi, In the below C code , i want to pass the array to a unix shel script. my script should called as ex myscript 1,2,3 #include <stdio.h> int main() { int a={1,2,3}; } Thanks, Arun (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

5. Shell Programming and Scripting

Can we pass an array of strings from a Perl Program to a Shell Script?

Hi Folks, The subject is my question: Can we pass an array of strings from a Perl Program to a Shell Script? Please provide some sample code. Thanks ---------- Post updated at 11:52 PM ---------- Previous update was at 11:43 PM ---------- I got it. Its here:... (0 Replies)
Discussion started by: som.nitk
0 Replies

6. Shell Programming and Scripting

every time user input create array perl

Hi, How to create array every time user input and store user input and display all array print " Enter input " my @input = split(' ', $input) chmop($input = <STDIN>; foreach ($input) { @array= @input; } print @array"\n"; (1 Reply)
Discussion started by: guidely
1 Replies

7. Shell Programming and Scripting

Store user input in differ

Hello all Can anyone help me to solve the below issue I want to take user input with space separated .The number of inputs can be variable like if user inputs 1 2 3 4 ouput will stored in as array a where i=4 and I can retreive the value like a =3 any thoughts how to do it ... (2 Replies)
Discussion started by: Pratik4891
2 Replies

8. Shell Programming and Scripting

Assign zero to strings that don't appear in block, store result in AWK array

Hi to all, I have this input: <group> <x "2">Group D</x> <x "3">Group B</x> <x "1">Group A</x> </group> <group> <x "1">Group E</x> <x "0">Group B</x> <x "1">Group C</x> </group> <group> ... (11 Replies)
Discussion started by: Ophiuchus
11 Replies

9. Shell Programming and Scripting

Shell script to loop and store in array

I'm trying to achieve the follwoinig with no luck. Find the directories that are greater than 50GB in size and pick the owner of the directory as I would like to send an alert notification. du -sh * | sort -rh 139G Dir_1 84G Dir_2 15G Dir_3 ls -l Dir_1 drwx------ 2... (3 Replies)
Discussion started by: 308002184
3 Replies

10. Programming

Python or Shell script to Grep strings from input file and output in csv format

Hi Experts, I am writing a python script to grep string from file and display output in csv file as in attached screenshot https://drive.google.com/file/d/1gfUUdfmQma33tz65NskThYDhkZUGQO0H/view Input file(result_EPFT_config_device) Below is the python script i have prepared as of... (1 Reply)
Discussion started by: as7951
1 Replies
semanage_user(3)					   Libsemanage API documentation					  semanage_user(3)

NAME
semanage_user - SELinux User Management API SYNOPSIS
#include <semanage/user_record.h> #include <semanage/users_policy.h> #include <semanage/users_local.h> This object contains properties associated with a SELinux user. Typically many Unix users are mapped to the same SELinux user. See seman- age_seuser(3) for overview of the Unix user API. For details on a specific function, see its manual page. Record API Overview semanage_user_create(3)- create a user semanage_user_free(3)- release resources for this user semanage_user_key_create(3)- create a key, which can be used to identify a user semanage_user_key_free(3)- release resources for this user key semanage_user_key_extract(3)- create a key matching this user semanage_user_clone(3)- create an identical user (deep-copy clone) semanage_user_compare(3)- compare this user to the provided key semanage_user_compare2(3)- compare this user to another Properties API Overview semanage_user_get_name(3)- return the name of this user semanage_user_set_name(3)- set the name of this user semanage_user_get_prefix(3)- return the labeling prefix for this user, used to control the contexts of user directories semanage_user_set_prefix(3)- set the labeling prefix for this user semanage_user_get_mlslevel(3)- return the default MLS level, which is assigned to this user at login time semanage_user_set_mlslevel(3)- set the default MLS level semanage_user_get_mlsrange(3)- return the range of valid MLS sensitivities and categories for this user semanage_user_set_mlsrange(3)- set the range of valid MLS sensitivities and categories for this user semanage_user_add_role(3)- add a role to the user's list of valid roles semanage_user_del_role(3)- remove a role from the user's list of valid roles semanage_user_has_role(3)- check if a role is valid for this user semanage_user_get_num_roles(3)- return the number of valid roles for this user semanage_user_get_roles(3)- return an array containing the roles for this user semanage_user_set_roles(3)- set the roles for this user Record Store API Overview semanage_user_modify_local(3)- add or update a user in the local store semanage_user_del_local(3)- delete a user from the local store semanage_user_exists(3)- check if a user is defined in the persistent policy semanage_user_exists_local(3)- check if a user is defined in the local store semanage_user_query(3)- query a user in the persistent policy semanage_user_query_local(3)- query a user in the local store semanage_user_count(3)- count the number of users defined in the persistent policy semanage_user_count_local(3)- count the number of users defined in the local store semanage_user_iterate(3)- execute a callback for each user in the persistent policy semanage_user_iterate_local(3)- execute a callback for each user in the local store semanage_user_list(3)- return an array containing all users in the persistent policy semanage_user_list_local(3)- return an array containing all users in the local store ivg2@cornell.edu 16 March 2006 semanage_user(3)
All times are GMT -4. The time now is 05:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy