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_seuser(3)					   Libsemanage API documentation					semanage_seuser(3)

NAME
semanage_seuser - Linux UID to SELinux User Management API SYNOPSIS
#include <semanage/seuser_record.h> #include <semanage/seusers_policy.h> #include <semanage/seusers_local.h> This object contains properties associated with a Unix user. Typically many Unix users are mapped to the same SELinux user. See seman- age_user(3) for overview of the SELinux user API. For details on a specific function, see its manual page. Record API Overview semanage_seuser_create(3)- create a seuser semanage_seuser_free(3)- release resources for this seuser semanage_seuser_key_create(3)- create a key, which can be used to identify a seuser semanage_seuser_key_free(3)- release resources for this seuser key semanage_seuser_key_extract(3)- create a key matching this seuser semanage_seuser_clone(3)- create an identical seuser (deep-copy clone) semanage_seuser_compare(3)- compare this seuser to the provided key semanage_seuser_compare2(3)- compare this seuser to another Properties API Overview semanage_seuser_get_name(3)- return the name of this seuser semanage_user_set_name(3)- set the name of this seuser semanage_seuser_get_sename(3)- return the name of the (SELinux) user mapped to this seuser semanage_user_set_sename(3)- set the name of the (SELinux) user mapped to this seuser semanage_user_get_mlsrange(3)- return a 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 Record Store API Overview semanage_seuser_modify_local(3)- add or update a seuser in the local store semanage_seuser_del_local(3)- delete a seuser from the local store semanage_seuser_exists(3)- check if a seuser is defined in the persistent policy semanage_seuser_exists_local(3)- check if a seuser is defined in the local store semanage_seuser_query(3)- query a seuser in the persistent policy semanage_seuser_query_local(3)- query a seuser in the local store semanage_seuser_count(3)- count the number of seusers defined in the persistent policy semanage_seuser_count_local(3)- count the number of seusers defined in the local store semanage_seuser_iterate(3)- execute a callback for each seuser in the persistent policy semanage_seuser_iterate_local(3)- execute a callback for each seuser in the local store semanage_seuser_list(3)- return an array containing all seusers in the persistent policy semanage_seuser_list_local(3)- return an array containing all seusers in the local store ivg2@cornell.edu 16 March 2006 semanage_seuser(3)
All times are GMT -4. The time now is 04:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy